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

ruby-changes:55309

From: naruse <ko1@a...>
Date: Thu, 11 Apr 2019 21:09:39 +0900 (JST)
Subject: [ruby-changes:55309] naruse:r67516 (ruby_2_6): merge revision(s) 67466: [Backport #15755]

naruse	2019-04-11 21:09:34 +0900 (Thu, 11 Apr 2019)

  New Revision: 67516

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67516

  Log:
    merge revision(s) 67466: [Backport #15755]
    
    enumerator.c: force hash values fixable
    
    * enumerator.c (arith_seq_hash): force hash values fixable on
      LLP64 environment.  [ruby-core:92190] [Bug #15755]

  Modified directories:
    branches/ruby_2_6/
  Modified files:
    branches/ruby_2_6/enumerator.c
    branches/ruby_2_6/test/ruby/test_arithmetic_sequence.rb
    branches/ruby_2_6/version.h
Index: ruby_2_6/enumerator.c
===================================================================
--- ruby_2_6/enumerator.c	(revision 67515)
+++ ruby_2_6/enumerator.c	(revision 67516)
@@ -3132,7 +3132,7 @@ arith_seq_hash(VALUE self) https://github.com/ruby/ruby/blob/trunk/ruby_2_6/enumerator.c#L3132
     hash = rb_hash_uint(hash, NUM2LONG(v));
     hash = rb_hash_end(hash);
 
-    return LONG2FIX(hash);
+    return ST2FIX(hash);
 }
 
 #define NUM_GE(x, y) RTEST(rb_num_coerce_relop((x), (y), idGE))
Index: ruby_2_6/test/ruby/test_arithmetic_sequence.rb
===================================================================
--- ruby_2_6/test/ruby/test_arithmetic_sequence.rb	(revision 67515)
+++ ruby_2_6/test/ruby/test_arithmetic_sequence.rb	(revision 67516)
@@ -107,6 +107,7 @@ class TestArithmeticSequence < Test::Uni https://github.com/ruby/ruby/blob/trunk/ruby_2_6/test/ruby/test_arithmetic_sequence.rb#L107
     assert_equal(seq.hash, seq.hash)
     assert_equal(seq.hash, 1.step.hash)
     assert_equal(seq.hash, 1.step(nil).hash)
+    assert_kind_of(String, seq.hash.to_s)
   end
 
   def test_first
Index: ruby_2_6/version.h
===================================================================
--- ruby_2_6/version.h	(revision 67515)
+++ ruby_2_6/version.h	(revision 67516)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_6/version.h#L1
 #define RUBY_VERSION "2.6.3"
 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 53
+#define RUBY_PATCHLEVEL 54
 
 #define RUBY_RELEASE_YEAR 2019
 #define RUBY_RELEASE_MONTH 4
Index: ruby_2_6
===================================================================
--- ruby_2_6	(revision 67515)
+++ ruby_2_6	(revision 67516)

Property changes on: ruby_2_6
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /trunk:r67466

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

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