From cdf993100566b2a42ffb040f0f2b7a900fdc5ff7 Mon Sep 17 00:00:00 2001 From: nagachika Date: Sun, 10 Sep 2017 12:33:09 +0000 Subject: merge revision(s) 59765: [Backport #13877] ruby.h: unnormalized Fixnum value * include/ruby/ruby.h (ST2FIX): fix unnormalized Fixnum value bug on mingw/mswin. [ruby-core:82687] [Bug #13877] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/bigdecimal/bigdecimal.c | 2 +- ext/date/date_core.c | 2 +- ext/openssl/ossl_bn.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ext') diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 0d9d0518a8..220d993ad2 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -382,7 +382,7 @@ BigDecimal_hash(VALUE self) hash ^= rb_memhash(p->frac, sizeof(BDIGIT)*p->Prec); hash += p->exponent; } - return INT2FIX(hash); + return ST2FIX(hash); } /* diff --git a/ext/date/date_core.c b/ext/date/date_core.c index 9b12c584a8..86ce0d8add 100644 --- a/ext/date/date_core.c +++ b/ext/date/date_core.c @@ -6444,7 +6444,7 @@ d_lite_hash(VALUE self) h[2] = m_df(dat); h[3] = m_sf(dat); v = rb_memhash(h, sizeof(h)); - return LONG2FIX(v); + return ST2FIX(v); } #include "date_tmx.h" diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c index aa0f2c605f..29dc1a2169 100644 --- a/ext/openssl/ossl_bn.c +++ b/ext/openssl/ossl_bn.c @@ -953,7 +953,7 @@ ossl_bn_hash(VALUE self) ossl_raise(eBNError, NULL); } - hash = INT2FIX(rb_memhash(buf, len)); + hash = ST2FIX(rb_memhash(buf, len)); xfree(buf); return hash; -- cgit v1.2.3