Skip to content

Commit

Permalink
used vanilla assert to both avoid a dep on make_pooled and work for u…
Browse files Browse the repository at this point in the history
…sers without batteries exported
  • Loading branch information
1bardesign committed Nov 22, 2024
1 parent baa5229 commit 159635f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion make_pooled.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ return function(class, limit)

--release an object back to the pool
function class.release(instance, ...)
assert:equal(instance:type(), class:type(), "wrong class released to pool")
assert(instance:type() == class:type(), "wrong class released to pool")
if #_pool < _pool_limit then
table.insert(_pool, instance)
end
Expand Down

0 comments on commit 159635f

Please sign in to comment.