diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-31 04:00:17 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-31 04:00:17 +0000 |
commit | 74d5623029b0b8fb987a45190f3a3eac082990e1 (patch) | |
tree | 7098f68924d61777d091df010681e173627091a5 /error.c | |
parent | e474ae633851e9956a94bd96fc40540740a367c0 (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 'error.c')
-rw-r--r-- | error.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -230,7 +230,7 @@ rb_check_type(x, t) etype = RSTRING(rb_obj_as_string(x))->ptr; } else { - etype = rb_class2name(CLASS_OF(x)); + etype = rb_obj_classname(x); } rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)", etype, type->name); @@ -724,7 +724,7 @@ void rb_check_frozen(obj) VALUE obj; { - if (OBJ_FROZEN(obj)) rb_error_frozen(rb_class2name(CLASS_OF(obj))); + if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj)); } static void |