1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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/trunk@67468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2019-04-08 03:26:29 +00:00
parent b5baceda18
commit ae6c195f30
2 changed files with 2 additions and 1 deletions

View file

@ -230,7 +230,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

View file

@ -203,6 +203,7 @@ class TestRange < Test::Unit::TestCase
assert_not_equal((0..1).hash, (0...1).hash)
assert_equal((0..nil).hash, (0..nil).hash)
assert_not_equal((0..nil).hash, (0...nil).hash)
assert_kind_of(String, (0..1).hash.to_s)
end
def test_step