summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-21 05:39:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-21 05:39:19 +0000
commitedbe98d848e4872654bb5273a6a8250492026c18 (patch)
tree9d9e68c491b333a85b01f36f74935e98f873b043 /object.c
parent9402cbeec54f5a4de56588a1b980f53e5d50c04e (diff)
* object.c (Init_Object): should do exact match for Module#==.
* compar.c (cmp_eq): returns 'false' if <=> returns 'nil'. * compar.c (cmp_gt,cmp_ge,cmp_lt,cmp_le,cmp_between): ditto. * pack.c (pack_pack): should propagate taintedness. * pack.c (pack_unpack): ditto. * eval.c (rb_thread_schedule): need to preserve errno before calling rb_trap_exec(). * regex.c (calculate_must_string): a bug in charset/charset_not parsing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/object.c b/object.c
index b5de7ca8bd..1b4b2c4d31 100644
--- a/object.c
+++ b/object.c
@@ -604,8 +604,7 @@ rb_mod_cmp(mod, arg)
return INT2FIX(1);
arg = RCLASS(arg)->super;
}
- rb_raise(rb_eArgError, "non related class/module");
- return Qnil; /* not reached */
+ return Qnil;
}
static VALUE
@@ -1308,6 +1307,7 @@ Init_Object()
rb_define_method(rb_cSymbol, "intern", sym_intern, 0);
rb_define_method(rb_cModule, "===", rb_mod_eqq, 1);
+ rb_define_method(rb_cModule, "==", rb_obj_equal, 1);
rb_define_method(rb_cModule, "<=>", rb_mod_cmp, 1);
rb_define_method(rb_cModule, "<", rb_mod_lt, 1);
rb_define_method(rb_cModule, "<=", rb_mod_le, 1);