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 | 28697731e92e64043a8bc1837e2c60735ee52d06 (patch) | |
tree | 50f69904a35df9fdcb33f9179b5fa52b226c1ac3 /numeric.c | |
parent | 57a8c47a51e8e87aa054beeda7c1495b9ef7b2ba (diff) | |
download | ruby-28697731e92e64043a8bc1837e2c60735ee52d06.tar.gz ruby-28697731e92e64043a8bc1837e2c60735ee52d06.tar.xz ruby-28697731e92e64043a8bc1837e2c60735ee52d06.zip |
* numeric.c ( num_numerator, num_denominator): use
to_r [ruby-core:23910].
git-svn-id: http://svn.ruby-lang.org/repos/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); } /* |