summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-08 03:01:33 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-08 03:01:33 +0000
commit6b5be413bbef7e32c331cfacbf55d1aa7b747822 (patch)
tree743bebd886daea7e93c85890b1da4ee9aae2442c
parent8ca1e1238e626ccb2e371bd4e1043d95aea03930 (diff)
* random.c (int_pair_to_real_inclusive): Use rb_funcall instead of
rb_big_mul because rb_integer_unpack can return a Fixnum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--random.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ddeb2426f..05a148d188 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Jun 8 11:59:55 2013 Tanaka Akira <akr@fsij.org>
+
+ * random.c (int_pair_to_real_inclusive): Use rb_funcall instead of
+ rb_big_mul because rb_integer_unpack can return a Fixnum.
+
Sat Jun 8 11:17:39 2013 Tanaka Akira <akr@fsij.org>
* random.c (int_pair_to_real_inclusive): Use rb_integer_pack.
diff --git a/random.c b/random.c
index f71b3b0e87..bfb961019c 100644
--- a/random.c
+++ b/random.c
@@ -293,7 +293,7 @@ int_pair_to_real_inclusive(uint32_t a, uint32_t b)
m = rb_integer_unpack(+1, mary, 2, sizeof(uint32_t), 0,
INTEGER_PACK_MSWORD_FIRST|INTEGER_PACK_NATIVE_BYTE_ORDER);
- x = rb_big_mul(x, m);
+ x = rb_funcall(x, '*', 1, m);
if (FIXNUM_P(x)) {
#if CHAR_BIT * SIZEOF_LONG > 64
r = (double)(FIX2ULONG(x) >> 64);