summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-15 13:18:15 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-15 13:18:15 +0000
commit835dcc220e713300c5eb392b08e254ac5ee62974 (patch)
treeb214149e50123b026197122353f9ad035d88cfc4 /numeric.c
parent24d84e6d8772d339cbad913eb67dfcd41ce7f3f9 (diff)
merges r28652 from trunk into ruby_1_9_2.
-- * numeric.c (fix_divide): must not use rb_rational_new1 for coercion because it returns an argument itself when canonical mode is set. [ruby-core:31279] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 3d42cbd4aa..fdea3ce50c 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2422,7 +2422,7 @@ fix_divide(VALUE x, VALUE y, ID op)
case T_RATIONAL:
if (op == '/' && FIX2LONG(x) == 1)
return rb_rational_reciprocal(y);
- return rb_funcall(rb_rational_new1(x), op, 1, y);
+ /* fall through */
default:
return rb_num_coerce_bin(x, y, op);
}