summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-31 04:00:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-31 04:00:17 +0000
commit74d5623029b0b8fb987a45190f3a3eac082990e1 (patch)
tree7098f68924d61777d091df010681e173627091a5 /class.c
parente474ae633851e9956a94bd96fc40540740a367c0 (diff)
* variable.c (rb_obj_classname): new function.
* string.c (rb_str_dup): should preserve original's class (but not hidden singleton class). * string.c (rb_str_substr): ditto. * parse.y: backout EXPR_CMDARG removal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/class.c b/class.c
index 114f87fbcd..f2122a32e2 100644
--- a/class.c
+++ b/class.c
@@ -293,7 +293,7 @@ rb_define_module(name)
module = rb_const_get(rb_cObject, id);
if (TYPE(module) == T_MODULE)
return module;
- rb_raise(rb_eTypeError, "%s is not a module", rb_class2name(CLASS_OF(module)));
+ rb_raise(rb_eTypeError, "%s is not a module", rb_obj_classname(module));
}
module = rb_define_module_id(id);
st_add_direct(rb_class_tbl, id, module);
@@ -315,7 +315,7 @@ rb_define_module_under(outer, name)
if (TYPE(module) == T_MODULE)
return module;
rb_raise(rb_eTypeError, "%s::%s is not a module",
- rb_class2name(outer), rb_class2name(CLASS_OF(module)));
+ rb_class2name(outer), rb_obj_classname(module));
}
module = rb_define_module_id(id);
rb_const_set(outer, id, module);