ruby-changes:43560
From: nagachika <ko1@a...>
Date: Mon, 11 Jul 2016 22:50:38 +0900 (JST)
Subject: [ruby-changes:43560] nagachika:r55633 (ruby_2_3): merge revision(s) 54168: [Backport #12391]
nagachika 2016-07-11 22:50:32 +0900 (Mon, 11 Jul 2016) New Revision: 55633 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55633 Log: merge revision(s) 54168: [Backport #12391] * bignum.c (rb_big_hash): make it public function to be available in other source files, and remove documentation comment for Bignum#hash. * bignum.c (Bignum#hash): remove its definition because it is unified with Object#hash. * include/ruby/intern.h (rb_big_hash): add a prototype declaration. * hash.c (any_hash): treat Bignum values directly. Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/bignum.c branches/ruby_2_3/hash.c branches/ruby_2_3/include/ruby/intern.h branches/ruby_2_3/version.h Index: ruby_2_3/bignum.c =================================================================== --- ruby_2_3/bignum.c (revision 55632) +++ ruby_2_3/bignum.c (revision 55633) @@ -6804,7 +6804,7 @@ rb_big_aref(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/ruby_2_3/bignum.c#L6804 * See also Object#hash. */ -static VALUE +VALUE rb_big_hash(VALUE x) { st_index_t hash; Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 55632) +++ ruby_2_3/ChangeLog (revision 55633) @@ -1,3 +1,15 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Mon Jul 11 22:35:00 2016 Kenta Murata <mrkn@m...> + + * bignum.c (rb_big_hash): make it public function to be available in + other source files, and remove documentation comment for Bignum#hash. + + * bignum.c (Bignum#hash): remove its definition because it is unified + with Object#hash. + + * include/ruby/intern.h (rb_big_hash): add a prototype declaration. + + * hash.c (any_hash): treat Bignum values directly. + Sat Jul 2 04:00:50 2016 Nobuyoshi Nakada <nobu@r...> * string.c (tr_trans): consider terminator length and fix heap Index: ruby_2_3/hash.c =================================================================== --- ruby_2_3/hash.c (revision 55632) +++ ruby_2_3/hash.c (revision 55633) @@ -153,6 +153,10 @@ any_hash(VALUE a, st_index_t (*other_fun https://github.com/ruby/ruby/blob/trunk/ruby_2_3/hash.c#L153 else if (BUILTIN_TYPE(a) == T_SYMBOL) { hnum = RSYMBOL(a)->hashval; } + else if (BUILTIN_TYPE(a) == T_BIGNUM) { + hval = rb_big_hash(a); + hnum = FIX2LONG(hval); + } else if (BUILTIN_TYPE(a) == T_FLOAT) { flt: hval = rb_dbl_hash(rb_float_value(a)); Index: ruby_2_3/include/ruby/intern.h =================================================================== --- ruby_2_3/include/ruby/intern.h (revision 55632) +++ ruby_2_3/include/ruby/intern.h (revision 55633) @@ -131,6 +131,7 @@ VALUE rb_big_or(VALUE, VALUE); https://github.com/ruby/ruby/blob/trunk/ruby_2_3/include/ruby/intern.h#L131 VALUE rb_big_xor(VALUE, VALUE); VALUE rb_big_lshift(VALUE, VALUE); VALUE rb_big_rshift(VALUE, VALUE); +VALUE rb_big_hash(VALUE); /* For rb_integer_pack and rb_integer_unpack: */ /* "MS" in MSWORD and MSBYTE means "most significant" */ Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 55632) +++ ruby_2_3/version.h (revision 55633) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.2" -#define RUBY_RELEASE_DATE "2016-07-02" -#define RUBY_PATCHLEVEL 137 +#define RUBY_RELEASE_DATE "2016-07-11" +#define RUBY_PATCHLEVEL 138 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 7 -#define RUBY_RELEASE_DAY 2 +#define RUBY_RELEASE_DAY 11 #include "ruby/version.h" Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r54168 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/