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 (method_hash): force hash values fixable on LLP64
  environment.  [ruby-core:92191] [Bug #15756]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2019-04-08 03:26:28 +00:00
parent 06eece87c6
commit b5baceda18
2 changed files with 2 additions and 1 deletions

2
proc.c
View file

@ -1557,7 +1557,7 @@ method_hash(VALUE method)
hash = rb_hash_method_entry(hash, m->me);
hash = rb_hash_end(hash);
return INT2FIX(hash);
return ST2FIX(hash);
}
/*

View file

@ -197,6 +197,7 @@ class TestMethod < Test::Unit::TestCase
def o.foo; end
assert_kind_of(Integer, o.method(:foo).hash)
assert_equal(Array.instance_method(:map).hash, Array.instance_method(:collect).hash)
assert_kind_of(String, o.method(:foo).hash.to_s)
end
def test_owner