summaryrefslogtreecommitdiff
path: root/bignum.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
commit24ef8ad19015f5d84bd11bce0165059850036e9d (patch)
treea3a2fba7ee2f02cd1810b856be069015dbfe8875 /bignum.c
parente3bb5c4ba3470b0e5803434ab7506591c8bc6cf4 (diff)
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 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 3207af9616..b650d83936 100644
--- a/bignum.c
+++ b/bignum.c
@@ -6176,7 +6176,7 @@ rb_big_fdiv_double(VALUE x, VALUE y)
return big_fdiv_float(x, 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")));
}
return dx / dy;
}