mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 21:49:06 +02:00
* 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:
parent
4122a13560
commit
3e6f0e6a20
3 changed files with 9 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue