summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-07-15 23:15:05 (GMT)
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-07-15 23:15:05 (GMT)
commitca524bcd494e2f284c3211cad8e8dde70e8aa86a (patch)
tree0b64cd0673bacdb2209c7b5e8e97244e7f3f38f9 /rational.c
parent34019a22eb41206e3d5d1ac29b3874275aa7f71c (diff)
Expanded f_numerator
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rational.c b/rational.c
index 7607628..7113e15 100644
--- a/rational.c
+++ b/rational.c
@@ -2057,8 +2057,8 @@ static VALUE float_to_r(VALUE self);
*
* See also Float#denominator.
*/
-static VALUE
-float_numerator(VALUE self)
+VALUE
+rb_float_numerator(VALUE self)
{
double d = RFLOAT_VALUE(self);
VALUE r;
@@ -2777,7 +2777,7 @@ Init_Rational(void)
rb_define_method(rb_cInteger, "numerator", integer_numerator, 0);
rb_define_method(rb_cInteger, "denominator", integer_denominator, 0);
- rb_define_method(rb_cFloat, "numerator", float_numerator, 0);
+ rb_define_method(rb_cFloat, "numerator", rb_float_numerator, 0);
rb_define_method(rb_cFloat, "denominator", rb_float_denominator, 0);
rb_define_method(rb_cNilClass, "to_r", nilclass_to_r, 0);