1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* bignum.c (bignorm): Don't call bigtrunc if the result is a fixnum.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-06-20 13:52:19 +00:00
parent 94e5fdf336
commit 7e36326c06
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu Jun 20 22:49:27 2013 Tanaka Akira <akr@fsij.org>
* bignum.c (bignorm): Don't call bigtrunc if the result is a fixnum.
Thu Jun 20 22:29:42 2013 Tanaka Akira <akr@fsij.org>
* bignum.c (rb_uint2big): Refactored.

View file

@ -322,7 +322,9 @@ static VALUE
bignorm(VALUE x)
{
if (RB_TYPE_P(x, T_BIGNUM)) {
x = bigfixize(bigtrunc(x));
x = bigfixize(x);
if (!FIXNUM_P(x))
bigtrunc(x);
}
return x;
}