ruby-changes:55638
From: usa <ko1@a...>
Date: Tue, 30 Apr 2019 23:00:42 +0900 (JST)
Subject: [ruby-changes:55638] usa:e31f9b0aff (ruby_2_5): merge revision(s) 67467: [Backport #15756]
https://git.ruby-lang.org/ruby.git/commit/?id=e31f9b0aff From e31f9b0aff2329544ce0798cccf34d381e34aa8a Mon Sep 17 00:00:00 2001 From: usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Tue, 30 Apr 2019 13:04:57 +0000 Subject: merge revision(s) 67467: [Backport #15756] 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/branches/ruby_2_5@67706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e diff --git a/proc.c b/proc.c index b14d144..303fc04 100644 --- a/proc.c +++ b/proc.c @@ -1550,7 +1550,7 @@ method_hash(VALUE method) https://github.com/ruby/ruby/blob/trunk/proc.c#L1550 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 fe0171d..cb68b2e 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -197,6 +197,7 @@ class TestMethod < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_method.rb#L197 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 diff --git a/version.h b/version.h index 043653f..6b71429 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L1 #define RUBY_VERSION "2.5.6" #define RUBY_RELEASE_DATE "2019-04-30" -#define RUBY_PATCHLEVEL 163 +#define RUBY_PATCHLEVEL 164 #define RUBY_RELEASE_YEAR 2019 #define RUBY_RELEASE_MONTH 4 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/