diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-03-07 18:36:53 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-03-07 18:36:53 +0900 |
| commit | 23853acbb67ef09dfded6c4a31f16d03c5260554 (patch) | |
| tree | 07b9e610a9b0665ee2e7fc6deae6ddbe2f5c2e75 /test | |
| parent | e40428af7b02870663a6c052496c176c22c5e875 (diff) | |
| parent | cab1f734ef9a9eb6b31d792bfc818e5cb4f3b300 (diff) | |
| download | mruby-23853acbb67ef09dfded6c4a31f16d03c5260554.tar.gz mruby-23853acbb67ef09dfded6c4a31f16d03c5260554.zip | |
Merge pull request #1823 from ksss/hash-eql
Fix behavior Hash#eql?
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/hash.rb | 8 |
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| |
