mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #6587 from mruby/ry422b-codex/add-tests-for-set#hash-method
This commit is contained in:
@@ -753,3 +753,11 @@ assert("Set operations with custom objects") do
|
||||
assert_equal(1, set_intersect_arr.size)
|
||||
assert_equal(obj2, set_intersect_arr.to_a[0])
|
||||
end
|
||||
|
||||
assert("Set#hash") do
|
||||
set1 = Set[1, 2, 3]
|
||||
set2 = Set[1, 2, 3]
|
||||
|
||||
assert_kind_of Integer, set1.hash
|
||||
assert_equal(set1.hash, set2.hash)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user