mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* intern.h, object.c (rb_class_inherited_p): export.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e54022001d
commit
f11f8e5e92
3 changed files with 11 additions and 6 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Oct 19 08:54:26 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* intern.h, object.c (rb_class_inherited_p): export.
|
||||||
|
|
||||||
Tue Oct 19 08:46:57 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Oct 19 08:46:57 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* string.c (rb_str_upto): method result must be checked. [ruby-dev:24504]
|
* string.c (rb_str_upto): method result must be checked. [ruby-dev:24504]
|
||||||
|
|
|
||||||
1
intern.h
1
intern.h
|
|
@ -307,6 +307,7 @@ VALUE rb_obj_freeze _((VALUE));
|
||||||
VALUE rb_obj_id _((VALUE));
|
VALUE rb_obj_id _((VALUE));
|
||||||
VALUE rb_obj_class _((VALUE));
|
VALUE rb_obj_class _((VALUE));
|
||||||
VALUE rb_class_real _((VALUE));
|
VALUE rb_class_real _((VALUE));
|
||||||
|
VALUE rb_class_inherited_p _((VALUE, VALUE));
|
||||||
VALUE rb_convert_type _((VALUE,int,const char*,const char*));
|
VALUE rb_convert_type _((VALUE,int,const char*,const char*));
|
||||||
VALUE rb_check_convert_type _((VALUE,int,const char*,const char*));
|
VALUE rb_check_convert_type _((VALUE,int,const char*,const char*));
|
||||||
VALUE rb_to_int _((VALUE));
|
VALUE rb_to_int _((VALUE));
|
||||||
|
|
|
||||||
12
object.c
12
object.c
|
|
@ -1308,8 +1308,8 @@ rb_mod_eqq(mod, arg)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
VALUE
|
||||||
rb_mod_le(mod, arg)
|
rb_class_inherited_p(mod, arg)
|
||||||
VALUE mod, arg;
|
VALUE mod, arg;
|
||||||
{
|
{
|
||||||
VALUE start = mod;
|
VALUE start = mod;
|
||||||
|
|
@ -1358,7 +1358,7 @@ rb_mod_lt(mod, arg)
|
||||||
VALUE mod, arg;
|
VALUE mod, arg;
|
||||||
{
|
{
|
||||||
if (mod == arg) return Qfalse;
|
if (mod == arg) return Qfalse;
|
||||||
return rb_mod_le(mod, arg);
|
return rb_class_inherited_p(mod, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1386,7 +1386,7 @@ rb_mod_ge(mod, arg)
|
||||||
rb_raise(rb_eTypeError, "compared with non class/module");
|
rb_raise(rb_eTypeError, "compared with non class/module");
|
||||||
}
|
}
|
||||||
|
|
||||||
return rb_mod_le(arg, mod);
|
return rb_class_inherited_p(arg, mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1434,7 +1434,7 @@ rb_mod_cmp(mod, arg)
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmp = rb_mod_le(mod, arg);
|
cmp = rb_class_inherited_p(mod, arg);
|
||||||
if (NIL_P(cmp)) return Qnil;
|
if (NIL_P(cmp)) return Qnil;
|
||||||
if (cmp) {
|
if (cmp) {
|
||||||
return INT2FIX(-1);
|
return INT2FIX(-1);
|
||||||
|
|
@ -2616,7 +2616,7 @@ Init_Object()
|
||||||
rb_define_method(rb_cModule, "==", rb_obj_equal, 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_cmp, 1);
|
||||||
rb_define_method(rb_cModule, "<", rb_mod_lt, 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_gt, 1);
|
||||||
rb_define_method(rb_cModule, ">=", rb_mod_ge, 1);
|
rb_define_method(rb_cModule, ">=", rb_mod_ge, 1);
|
||||||
rb_define_method(rb_cModule, "initialize_copy", rb_mod_init_copy, 1);
|
rb_define_method(rb_cModule, "initialize_copy", rb_mod_init_copy, 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue