mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rational.c: removed needless calc
* rational.c (read_num): exp(0) is 1, no need to multiply. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f954caea43
commit
789853edc6
1 changed files with 1 additions and 1 deletions
|
@ -2437,7 +2437,7 @@ read_num(const char **s, const char *const end, VALUE *num, VALUE *div)
|
|||
*div = f_expt10(negate_num(exp));
|
||||
}
|
||||
else {
|
||||
*num = rb_int_mul(n, f_expt10(exp));
|
||||
if (exp != ZERO) *num = rb_int_mul(n, f_expt10(exp));
|
||||
*div = ONE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue