Merge pull request #6587 from mruby/ry422b-codex/add-tests-for-set#hash-method

This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-07-26 15:27:43 +09:00
committed by GitHub
+8
View File
@@ -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