summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/t/hash.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/t/hash.rb b/test/t/hash.rb
index 837fe0216..92bc223b6 100644
--- a/test/t/hash.rb
+++ b/test/t/hash.rb
@@ -269,6 +269,14 @@ end
# Not ISO specified
+assert('Hash#eql?') do
+ a = { 'a' => 1, 'b' => 2, 'c' => 3 }
+ b = { 'a' => 1, 'b' => 2, 'c' => 3 }
+ c = { 'a' => 1.0, 'b' => 2, 'c' => 3 }
+ assert_true(a.eql?(b))
+ assert_false(a.eql?(c))
+end
+
assert('Hash#reject') do
h = {:one => 1, :two => 2, :three => 3, :four => 4}
ret = h.reject do |k,v|