diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-05-09 03:28:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-05-09 03:28:08 +0000 |
commit | 8624d6b3f61dbe9760b28f42821fe99f0e07754b (patch) | |
tree | 3f22f9b51eaba53c286e76368d39faca2edccd92 /numeric.c | |
parent | 587035c080a8d3bf7016ee70f4841c1af40d36c0 (diff) | |
download | ruby-8624d6b3f61dbe9760b28f42821fe99f0e07754b.tar.gz |
* bignum.c (Init_Bignum), numeric.c (Init_Numeric): added fdiv as
aliases of quo. [ruby-dev:30771]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -244,6 +244,7 @@ num_uminus(num) /* * call-seq: * num.quo(numeric) => result + * num.fdiv(numeric) => result * * Equivalent to <code>Numeric#/</code>, but overridden in subclasses. */ @@ -2093,6 +2094,7 @@ fixdivmod(x, y, divp, modp) /* * call-seq: * fix.quo(numeric) => float + * fix.fdiv(numeric) => float * * Returns the floating point result of dividing <i>fix</i> by * <i>numeric</i>. @@ -2831,6 +2833,7 @@ Init_Numeric() rb_define_method(rb_cNumeric, "<=>", num_cmp, 1); rb_define_method(rb_cNumeric, "eql?", num_eql, 1); rb_define_method(rb_cNumeric, "quo", num_quo, 1); + rb_define_method(rb_cNumeric, "fdiv", num_quo, 1); rb_define_method(rb_cNumeric, "div", num_div, 1); rb_define_method(rb_cNumeric, "divmod", num_divmod, 1); rb_define_method(rb_cNumeric, "modulo", num_modulo, 1); @@ -2887,6 +2890,7 @@ Init_Numeric() rb_define_method(rb_cFixnum, "modulo", fix_mod, 1); rb_define_method(rb_cFixnum, "divmod", fix_divmod, 1); rb_define_method(rb_cFixnum, "quo", fix_quo, 1); + rb_define_method(rb_cFixnum, "fdiv", fix_quo, 1); rb_define_method(rb_cFixnum, "**", fix_pow, 1); rb_define_method(rb_cFixnum, "abs", fix_abs, 0); |