summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-29 11:31:03 (GMT)
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-29 11:31:03 (GMT)
commit2b9df66146001e3672b91ace98aba1cb72d355e4 (patch)
tree73a356f5b181aa97de0d6fab2519e797134e2cf6 /rational.c
parentee5add4a793fb5d0fda51dbc01c59842e5f615c2 (diff)
* rational.c (float_to_r): always returns rational.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rational.c b/rational.c
index 8089f4a..19ec3d1 100644
--- a/rational.c
+++ b/rational.c
@@ -1680,7 +1680,7 @@ float_to_r(VALUE self)
VALUE f, n;
float_decode_internal(self, &f, &n);
- return f_mul(f, f_expt(INT2FIX(FLT_RADIX), n));
+ return f_to_r(f_mul(f, f_expt(INT2FIX(FLT_RADIX), n)));
}
static VALUE rat_pat, an_e_pat, a_dot_pat, underscores_pat, an_underscore;