summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-08-20 04:29:58 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-08-20 04:29:58 +0000
commitc7868668121470b56f173a596b750e8a27fe9e18 (patch)
tree96b130e912efefc888dd4f84dc35ca5de9077776 /object.c
parent772ed5507e569d7697841492a37d7607adbc9385 (diff)
* range.c (range_step): 'iter' here should be an array.
* marshal.c (w_object): should retrieve __member__ data from non-singleton class. * variable.c (rb_cvar_get): class variable override check added. * variable.c (rb_cvar_set): ditto * variable.c (rb_cvar_declare): ditto. * parse.y (parse_regx): handle backslash escaping of delimiter here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/object.c b/object.c
index f602344..6f4a293 100644
--- a/object.c
+++ b/object.c
@@ -81,7 +81,7 @@ rb_class_real(cl)
}
VALUE
-rb_obj_type(obj)
+rb_obj_class(obj)
VALUE obj;
{
return rb_class_real(CLASS_OF(obj));
@@ -116,7 +116,7 @@ rb_obj_dup(obj)
rb_raise(rb_eTypeError, "dupulicated object must be same type");
}
if (!SPECIAL_CONST_P(dup)) {
- OBJSETUP(dup, rb_obj_type(obj), BUILTIN_TYPE(obj));
+ OBJSETUP(dup, rb_obj_class(obj), BUILTIN_TYPE(obj));
OBJ_INFECT(dup, obj);
if (FL_TEST(obj, FL_EXIVAR)) {
FL_SET(dup, FL_EXIVAR);
@@ -233,7 +233,7 @@ rb_obj_is_instance_of(obj, c)
rb_raise(rb_eTypeError, "class or module required");
}
- if (rb_obj_type(obj) == c) return Qtrue;
+ if (rb_obj_class(obj) == c) return Qtrue;
return Qfalse;
}
@@ -1155,8 +1155,8 @@ Init_Object()
rb_define_method(rb_mKernel, "hash", rb_obj_id, 0);
rb_define_method(rb_mKernel, "id", rb_obj_id, 0);
rb_define_method(rb_mKernel, "__id__", rb_obj_id, 0);
- rb_define_method(rb_mKernel, "type", rb_obj_type, 0);
- rb_define_method(rb_mKernel, "class", rb_obj_type, 0);
+ rb_define_method(rb_mKernel, "type", rb_obj_class, 0);
+ rb_define_method(rb_mKernel, "class", rb_obj_class, 0);
rb_define_method(rb_mKernel, "clone", rb_obj_clone, 0);
rb_define_method(rb_mKernel, "dup", rb_obj_dup, 0);