summaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-01 02:32:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-01 02:32:17 +0000
commitd07be4d4f51e57f20daae9b00038bc6becb0e62c (patch)
treeb8beee53741aa357eef0b130b9d69338833d33c4 /numeric.c
parent4df356656c6d76350eaf4430413bf8c95eb94f54 (diff)
downloadruby-d07be4d4f51e57f20daae9b00038bc6becb0e62c.tar.gz
ruby-d07be4d4f51e57f20daae9b00038bc6becb0e62c.tar.xz
ruby-d07be4d4f51e57f20daae9b00038bc6becb0e62c.zip
* numeric.c (num_round): should convert self to Float.
[ruby-dev:30860] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/numeric.c b/numeric.c
index 36d2153e1..8cf7a1e48 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1343,11 +1343,7 @@ num_ceil(VALUE num)
static VALUE
num_round(int argc, VALUE* argv, VALUE num)
{
- VALUE nd;
-
- rb_scan_args(argc, argv, "01", &nd);
- nd = rb_Float(nd);
- return flo_round(argc, &nd, num);
+ return flo_round(argc, argv, rb_Float(num));
}
/*