diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-21 10:35:02 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-21 10:35:02 +0000 |
| commit | fb2636685851909250b9886d42c598a54f1ad29d (patch) | |
| tree | 21055985f0be1fb74836eec6045a3079a0dfb7d6 /numeric.c | |
| parent | 0776e3f4d4adb054e3a0ef1f7af40ed36df48167 (diff) | |
merges r23733 from trunk into ruby_1_9_1.
--
* numeric.c ( num_numerator, num_denominator): use
to_r [ruby-core:23910].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
| -rw-r--r-- | numeric.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1748,13 +1748,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); } /* |
