diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-18 11:33:52 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-18 11:33:52 +0000 |
commit | 1fda5e1a3fc8b8f8baedff353f22ff5cd9fd280b (patch) | |
tree | 50f69904a35df9fdcb33f9179b5fa52b226c1ac3 /numeric.c | |
parent | dd2c22ae4d56c936b3eccc3ce2321b1de7c61a8a (diff) | |
download | ruby-1fda5e1a3fc8b8f8baedff353f22ff5cd9fd280b.tar.gz |
* numeric.c ( num_numerator, num_denominator): use
to_r [ruby-core:23910].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1792,13 +1792,15 @@ rb_num2ull(VALUE val) static VALUE num_numerator(VALUE num) { - return rb_funcall(rb_Rational1(num), rb_intern("numerator"), 0); + return rb_funcall(rb_funcall(num, rb_intern("to_r"), 0), + rb_intern("numerator"), 0); } static VALUE num_denominator(VALUE num) { - return rb_funcall(rb_Rational1(num), rb_intern("denominator"), 0); + return rb_funcall(rb_funcall(num, rb_intern("to_r"), 0), + rb_intern("denominator"), 0); } /* |