summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-10 11:49:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-10 11:49:14 +0000
commitb416c57c0a998c6f2435e419860b7645508816d6 (patch)
treeef5294184f4d584d318e96c7174a6d41080dde11 /object.c
parent509fa974311b936279d9c25544fb06f41771ea0b (diff)
downloadruby-b416c57c0a998c6f2435e419860b7645508816d6.tar.gz
* eval.c (method_proc): return bound Proc object. [ruby-dev:22854]
* eval.c (rb_mod_define_method): bind method body itself for Method object. * node.h (NODE_DMETHOD): deprecated. * object.c (rb_class_inherited_p): export. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/object.c b/object.c
index f996aa992d..bbc9ec5390 100644
--- a/object.c
+++ b/object.c
@@ -1269,8 +1269,8 @@ rb_mod_eqq(mod, arg)
*
*/
-static VALUE
-rb_mod_le(mod, arg)
+VALUE
+rb_class_inherited_p(mod, arg)
VALUE mod, arg;
{
VALUE start = mod;
@@ -1314,7 +1314,7 @@ rb_mod_lt(mod, arg)
VALUE mod, arg;
{
if (mod == arg) return Qfalse;
- return rb_mod_le(mod, arg);
+ return rb_class_inherited_p(mod, arg);
}
@@ -1342,7 +1342,7 @@ rb_mod_ge(mod, arg)
rb_raise(rb_eTypeError, "compared with non class/module");
}
- return rb_mod_le(arg, mod);
+ return rb_class_inherited_p(arg, mod);
}
/*
@@ -1390,7 +1390,7 @@ rb_mod_cmp(mod, arg)
return Qnil;
}
- cmp = rb_mod_le(mod, arg);
+ cmp = rb_class_inherited_p(mod, arg);
if (NIL_P(cmp)) return Qnil;
if (cmp) {
return INT2FIX(-1);
@@ -2569,7 +2569,7 @@ Init_Object()
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);
+ rb_define_method(rb_cModule, "<=", rb_class_inherited_p, 1);
rb_define_method(rb_cModule, ">", rb_mod_gt, 1);
rb_define_method(rb_cModule, ">=", rb_mod_ge, 1);
rb_define_method(rb_cModule, "initialize_copy", rb_mod_init_copy, 1); /* in class.c */