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

revert r31783.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-05-29 22:06:54 +00:00
parent 4de27b35b5
commit 3b58e17d7b
2 changed files with 1 additions and 5 deletions

View file

@ -1,7 +1,3 @@
Sun May 29 23:22:46 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* numeric.c (flo_round): use absolute value as divisor.
Sun May 29 23:17:29 2011 NARUSE, Yui <naruse@ruby-lang.org> Sun May 29 23:17:29 2011 NARUSE, Yui <naruse@ruby-lang.org>
* re.c (rb_reg_match): fix rdoc of Regexp#=~. * re.c (rb_reg_match): fix rdoc of Regexp#=~.

View file

@ -1512,7 +1512,7 @@ flo_round(int argc, VALUE *argv, VALUE num)
VALUE f10 = int_pow(10, -ndigits); VALUE f10 = int_pow(10, -ndigits);
VALUE n10 = f10; VALUE n10 = f10;
if (number < 0) { if (number < 0) {
n10 = FIXNUM_P(n10) ? fix_uminus(n10) : rb_big_uminus(n10); f10 = FIXNUM_P(f10) ? fix_uminus(f10) : rb_big_uminus(f10);
} }
num = rb_big_idiv(rb_dbl2big(absnum), n10); num = rb_big_idiv(rb_dbl2big(absnum), n10);
return FIXNUM_P(num) ? fix_mul(num, f10) : rb_big_mul(num, f10); return FIXNUM_P(num) ? fix_mul(num, f10) : rb_big_mul(num, f10);