[前][次][番号順一覧][スレッド一覧]

ruby-changes:55639

From: usa <ko1@a...>
Date: Tue, 30 Apr 2019 23:00:42 +0900 (JST)
Subject: [ruby-changes:55639] usa:bf4a14a274 (ruby_2_5): merge revision(s) 67468: [Backport #15757]

https://git.ruby-lang.org/ruby.git/commit/?id=bf4a14a274

From bf4a14a274fbcc02356336449c52d3553938014a Mon Sep 17 00:00:00 2001
From: usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Tue, 30 Apr 2019 13:02:42 +0000
Subject: 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

diff --git a/range.c b/range.c
index 5897557..4993a5e 100644
--- a/range.c
+++ b/range.c
@@ -232,7 +232,7 @@ range_hash(VALUE range) https://github.com/ruby/ruby/blob/trunk/range.c#L232
     hash = rb_hash_uint(hash, EXCL(range) << 24);
     hash = rb_hash_end(hash);
 
-    return LONG2FIX(hash);
+    return ST2FIX(hash);
 }
 
 static void
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb
index fef7acc..da88376 100644
--- a/test/ruby/test_range.rb
+++ b/test/ruby/test_range.rb
@@ -165,6 +165,7 @@ class TestRange < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_range.rb#L165
     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
diff --git a/version.h b/version.h
index 31c42fa..043653f 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 162
+#define RUBY_PATCHLEVEL 163
 
 #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/

[前][次][番号順一覧][スレッド一覧]