summaryrefslogtreecommitdiff
path: root/range.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 /range.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 'range.c')
-rw-r--r--range.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/range.c b/range.c
index 1ce4aae..585940a 100644
--- a/range.c
+++ b/range.c
@@ -275,7 +275,7 @@ range_step(argc, argv, range)
if (!rb_respond_to(b, id_succ)) {
rb_raise(rb_eTypeError, "cannot iterate from %s",
- rb_class2name(CLASS_OF(b)));
+ rb_obj_classname(b));
}
args[0] = 1;
@@ -304,7 +304,7 @@ range_each(range)
if (!rb_respond_to(beg, id_succ)) {
rb_raise(rb_eTypeError, "cannot iterate from %s",
- rb_class2name(CLASS_OF(beg)));
+ rb_obj_classname(beg));
}
if (FIXNUM_P(beg) && FIXNUM_P(end)) { /* fixnums are special */
long lim = FIX2LONG(end);
@@ -471,7 +471,7 @@ range_member(range, val)
if (!rb_respond_to(beg, id_succ)) {
rb_raise(rb_eTypeError, "cannot iterate from %s",
- rb_class2name(CLASS_OF(beg)));
+ rb_obj_classname(beg));
}
args[0] = val;
args[1] = Qfalse;