aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-22 03:05:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-22 03:05:02 +0000
commitcab515ac9be62ba4a7d289ec2cbd794bfe814314 (patch)
treea3a2fba7ee2f02cd1810b856be069015dbfe8875 /numeric.c
parent7a95f5ecb7eb03aa26825ca9a31dd8f212dbfc95 (diff)
downloadruby-cab515ac9be62ba4a7d289ec2cbd794bfe814314.tar.gz
numeric.c: use NUM2DBL
* numeric.c (fix_fdiv_double), bignum.c (rb_big_fdiv_double): use NUM2DBL on unknown object. RFLOAT_VALUE is only appliicable to T_FLOAT object. [ruby-core:82924] [Bug #13928] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59986 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 480ab7e0cb..597bfb54dd 100644
--- a/numeric.c
+++ b/numeric.c
@@ -3629,7 +3629,7 @@ fix_fdiv_double(VALUE x, VALUE y)
return (double)FIX2LONG(x) / RFLOAT_VALUE(y);
}
else {
- return RFLOAT_VALUE(rb_num_coerce_bin(x, y, rb_intern("fdiv")));
+ return NUM2DBL(rb_num_coerce_bin(x, y, rb_intern("fdiv")));
}
}