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 /numeric.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 'numeric.c')
-rw-r--r-- | numeric.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -96,8 +96,8 @@ coerce_rescue(x) rb_raise(rb_eTypeError, "%s can't be coerced into %s", rb_special_const_p(x[1])? RSTRING(rb_inspect(x[1]))->ptr: - rb_class2name(CLASS_OF(x[1])), - rb_class2name(CLASS_OF(x[0]))); + rb_obj_classname(x[1]), + rb_obj_classname(x[0])); return Qnil; /* dummy */ } @@ -146,7 +146,7 @@ num_copy_object(x, y) VALUE x, y; { /* Numerics are immutable values, which should not be copied */ - rb_raise(rb_eTypeError, "can't copy %s", rb_class2name(CLASS_OF(x))); + rb_raise(rb_eTypeError, "can't copy %s", rb_obj_classname(x)); return Qnil; /* not reached */ } @@ -1127,7 +1127,7 @@ rb_int_induced_from(klass, x) return rb_funcall(x, id_to_i, 0); default: rb_raise(rb_eTypeError, "failed to convert %s into Integer", - rb_class2name(CLASS_OF(x))); + rb_obj_classname(x)); } } @@ -1143,7 +1143,7 @@ rb_flo_induced_from(klass, x) return x; default: rb_raise(rb_eTypeError, "failed to convert %s into Float", - rb_class2name(CLASS_OF(x))); + rb_obj_classname(x)); } } |