diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-21 10:35:37 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-21 10:35:37 +0000 |
commit | 9bf9043556167cea83430f574883f4c70a99f7b1 (patch) | |
tree | 0c4d4cffd4ecf67273d1c9d73ba6b82805927a09 /numeric.c | |
parent | 979153cf9b89f534b01fd538a60265d868bd9020 (diff) |
merges r23741 from trunk into ruby_1_9_1.
--
* numeric.c (*_numerator,*_denominator): moved to rational.c.
* rational.c (*_numerator,*_denominator): moved from numeric.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 33 |
1 files changed, 0 insertions, 33 deletions
@@ -1355,7 +1355,6 @@ flo_truncate(VALUE num) return LONG2FIX(val); } - /* * call-seq: * num.floor => integer @@ -1745,20 +1744,6 @@ rb_num2ull(VALUE val) #endif /* HAVE_LONG_LONG */ -static VALUE -num_numerator(VALUE num) -{ - 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_funcall(num, rb_intern("to_r"), 0), - rb_intern("denominator"), 0); -} - /* * Document-class: Integer * @@ -1959,18 +1944,6 @@ int_ord(num) return num; } -static VALUE -int_numerator(VALUE num) -{ - return num; -} - -static VALUE -int_denominator(VALUE num) -{ - return INT2FIX(1); -} - /******************************************************************** * * Document-class: Fixnum @@ -3140,9 +3113,6 @@ Init_Numeric(void) rb_define_method(rb_cNumeric, "truncate", num_truncate, 0); rb_define_method(rb_cNumeric, "step", num_step, -1); - rb_define_method(rb_cNumeric, "numerator", num_numerator, 0); - rb_define_method(rb_cNumeric, "denominator", num_denominator, 0); - rb_cInteger = rb_define_class("Integer", rb_cNumeric); rb_undef_alloc_func(rb_cInteger); rb_undef_method(CLASS_OF(rb_cInteger), "new"); @@ -3165,9 +3135,6 @@ Init_Numeric(void) rb_define_method(rb_cInteger, "truncate", int_to_i, 0); rb_define_method(rb_cInteger, "round", int_round, -1); - rb_define_method(rb_cInteger, "numerator", int_numerator, 0); - rb_define_method(rb_cInteger, "denominator", int_denominator, 0); - rb_cFixnum = rb_define_class("Fixnum", rb_cInteger); rb_define_method(rb_cFixnum, "to_s", fix_to_s, -1); |