diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-18 15:02:45 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-18 15:02:45 +0000 |
commit | 2f92eee6158d948eba1dacde0c733bf4c1c9aea1 (patch) | |
tree | d44311a8f4b88db9ac0b0961aaf096a8fe75c11d /bignum.c | |
parent | dd828d4c7799f3d886d3be9a56fa4701b2887249 (diff) | |
download | ruby-2f92eee6158d948eba1dacde0c733bf4c1c9aea1.tar.gz |
* bignum.c (rb_big_to_f, Bignum#to_f): removed them because they are
unified with int_to_f and Integer#to_f.
* numeric.c (int_to_f): treat Bignum values directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -5191,21 +5191,6 @@ rb_big2dbl(VALUE x) return d; } -/* - * call-seq: - * big.to_f -> float - * - * Converts <i>big</i> to a <code>Float</code>. If <i>big</i> doesn't - * fit in a <code>Float</code>, the result is infinity. - * - */ - -static VALUE -rb_big_to_f(VALUE x) -{ - return DBL2NUM(rb_big2dbl(x)); -} - VALUE rb_integer_float_cmp(VALUE x, VALUE y) { @@ -7033,7 +7018,6 @@ Init_Bignum(void) rb_define_method(rb_cBignum, "<", big_lt, 1); rb_define_method(rb_cBignum, "<=", big_le, 1); rb_define_method(rb_cBignum, "===", rb_big_eq, 1); - rb_define_method(rb_cBignum, "to_f", rb_big_to_f, 0); rb_define_method(rb_cBignum, "abs", rb_big_abs, 0); rb_define_method(rb_cBignum, "magnitude", rb_big_abs, 0); rb_define_method(rb_cBignum, "size", rb_big_size, 0); |