aboutsummaryrefslogtreecommitdiffstats
path: root/variable.c
diff options
context:
space:
mode:
authorstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-06 19:58:12 +0000
committerstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-06 19:58:12 +0000
commitf8174b98f7f0b744a7c7041845326b2c0d8409ef (patch)
tree0af5154ef65f8856a609662986684f09cea72c69 /variable.c
parent0523603365cf23ddbae4d9ebae73a5d3143a43a5 (diff)
downloadruby-f8174b98f7f0b744a7c7041845326b2c0d8409ef.tar.gz
make Integer#{round,floor,ceil,truncate} always return integer
* numeric.c (int_round): return integer (self) instead of float for Integer#round with positive ndigits argument, because conversion to float introduces errors for large integers. * numeric.c (int_floor): ditto for Integer#floor. * numeric.c (int_ceil): ditto for Integer#ceil. * numeric.c (int_truncate): ditto for Integer#truncate. * test/ruby/test_integer.rb: adjust test cases and add some more. [ruby-core:80645] [Bug #13420] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
0 files changed, 0 insertions, 0 deletions