Skip to content

Commit

Permalink
Merge pull request #126 from o-lim/fix-deepcompare
Browse files Browse the repository at this point in the history
Use rawequal instead of == in util.deepcompare
  • Loading branch information
DorianGray committed Jul 14, 2015
2 parents 47bf1c4 + d16c382 commit d63fbb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function util.deepcompare(t1,t2,ignore_mt,cycles,thresh1,thresh2)
-- then use that unless asked not to
if not ignore_mt then return t1 == t2 end
else -- we can skip the deep comparison below if t1 and t2 share identity
if t1 == t2 then return true end
if rawequal(t1, t2) then return true end
end

-- handle recursive tables
Expand Down

0 comments on commit d63fbb7

Please sign in to comment.