summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_hash.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index 59000ad5d6..69783981d5 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -1262,8 +1262,14 @@ class TestHash < Test::Unit::TestCase
end
end
- hash = {5 => bug9381}
- assert_equal(bug9381, hash[wrapper.new(5)])
+ bad = [
+ 5, true, false, nil,
+ 0.0, 1.72723e-77,
+ ].select do |x|
+ hash = {x => bug9381}
+ hash[wrapper.new(x)] != bug9381
+ end
+ assert_empty(bad, bug9381)
end
class TestSubHash < TestHash