summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-03 12:31:26 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-03 12:31:26 +0000
commit0d2d098660566761019c8d5ffbeafd0444d0605c (patch)
treee0e08ba897922ad81996504005c7e12ff3a2fbd6 /complex.c
parentbac1841a9382494fcc1bad5d982aa8677091a544 (diff)
* complex.c (nucomp_equal_p): removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/complex.c b/complex.c
index 8031d4e27a..e8c6a9428a 100644
--- a/complex.c
+++ b/complex.c
@@ -18,9 +18,9 @@
VALUE rb_cComplex;
static ID id_abs, id_abs2, id_arg, id_cmp, id_conj, id_convert,
- id_denominator, id_divmod, id_eqeq_p, id_equal_p, id_expt, id_fdiv,
- id_floor, id_idiv, id_imag, id_inspect, id_negate, id_numerator,
- id_quo, id_real, id_real_p, id_to_f, id_to_i, id_to_r, id_to_s;
+ id_denominator, id_divmod, id_eqeq_p, id_expt, id_fdiv, id_floor,
+ id_idiv, id_imag, id_inspect, id_negate, id_numerator, id_quo,
+ id_real, id_real_p, id_to_f, id_to_i, id_to_r, id_to_s;
#define f_boolcast(x) ((x) ? Qtrue : Qfalse)
@@ -170,14 +170,6 @@ fun1(to_s)
fun2(divmod)
inline static VALUE
-f_equal_p(VALUE x, VALUE y)
-{
- if (FIXNUM_P(x) && FIXNUM_P(y))
- return f_boolcast(FIX2LONG(x) == FIX2LONG(y));
- return rb_funcall(x, id_equal_p, 1, y);
-}
-
-inline static VALUE
f_eqeq_p(VALUE x, VALUE y)
{
if (FIXNUM_P(x) && FIXNUM_P(y))
@@ -894,24 +886,6 @@ nucomp_expt(VALUE self, VALUE other)
* call-seq:
* cmp == object -> true or false
*
- * Returns true if cmp is same as object.
- */
-static VALUE
-nucomp_equal_p(VALUE self, VALUE other)
-{
- if (k_complex_p(other)) {
- get_dat2(self, other);
-
- return f_boolcast(f_equal_p(adat->real, bdat->real) &&
- f_equal_p(adat->imag, bdat->imag));
- }
- return Qfalse;
-}
-
-/*
- * call-seq:
- * cmp == object -> true or false
- *
* Returns true if cmp equals object numerically.
*/
static VALUE
@@ -1831,7 +1805,6 @@ Init_Complex(void)
id_convert = rb_intern("convert");
id_denominator = rb_intern("denominator");
id_divmod = rb_intern("divmod");
- id_equal_p = rb_intern("equal?");
id_eqeq_p = rb_intern("==");
id_expt = rb_intern("**");
id_fdiv = rb_intern("fdiv");
@@ -1901,7 +1874,6 @@ Init_Complex(void)
rb_define_method(rb_cComplex, "fdiv", nucomp_fdiv, 1);
rb_define_method(rb_cComplex, "**", nucomp_expt, 1);
- rb_define_method(rb_cComplex, "equal?", nucomp_equal_p, 1);
rb_define_method(rb_cComplex, "==", nucomp_eqeq_p, 1);
rb_define_method(rb_cComplex, "coerce", nucomp_coerce, 1);