hash value of enumerable should be obtained from its elements; close #1658

This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-01-16 21:33:48 +09:00
parent e63c1e1d49
commit c7cff199dc
3 changed files with 19 additions and 3 deletions
+1 -3
View File
@@ -301,6 +301,7 @@ assert('Array#hash', '15.2.12.5.35') do
a = [ 1, 2, 3 ]
assert_true(a.hash.is_a? Integer)
assert_equal([1,2].hash, [1,2].hash)
end
assert('Array#<=>', '15.2.12.5.36') do
@@ -328,6 +329,3 @@ assert("Array (Longish inline array)") do
ary.each {|p| h[p.class] += 1}
assert_equal({Array=>200}, h)
end