* numeric.c (int_round): should not return false, but self.

[ruby-dev:31212]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-07-13 15:38:48 +00:00
parent 4122a13560
commit 3e6f0e6a20
3 changed files with 9 additions and 4 deletions

View file

@ -2900,7 +2900,7 @@ int_round(int argc, VALUE* argv, VALUE num)
VALUE n, f, h, r;
int ndigits;
if (argc == 0) return 0;
if (argc == 0) return num;
rb_scan_args(argc, argv, "1", &n);
ndigits = NUM2INT(n);
if (ndigits > 0) {