merge revision(s) 67468: [Backport #15757]
range.c: force hash values fixable * range.c (range_hash): force hash values fixable on LLP64 environment. [ruby-core:92194] [Bug #15757] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
860e548a63
commit
bf4a14a274
2
range.c
2
range.c
|
@ -232,7 +232,7 @@ range_hash(VALUE range)
|
|||
hash = rb_hash_uint(hash, EXCL(range) << 24);
|
||||
hash = rb_hash_end(hash);
|
||||
|
||||
return LONG2FIX(hash);
|
||||
return ST2FIX(hash);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -165,6 +165,7 @@ class TestRange < Test::Unit::TestCase
|
|||
assert_kind_of(Integer, (0..1).hash)
|
||||
assert_equal((0..1).hash, (0..1).hash)
|
||||
assert_not_equal((0..1).hash, (0...1).hash)
|
||||
assert_kind_of(String, (0..1).hash.to_s)
|
||||
end
|
||||
|
||||
def test_step
|
||||
|
|
Loading…
Reference in New Issue