diff options
-rw-r--r-- | proc.c | 2 | ||||
-rw-r--r-- | test/ruby/test_method.rb | 1 |
2 files changed, 2 insertions, 1 deletions
@@ -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); } /* diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index f313279f62..beffaa8ce0 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -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 |