summaryrefslogtreecommitdiff
path: root/io.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 /io.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 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index f529776..a112656 100644
--- a/io.c
+++ b/io.c
@@ -647,7 +647,7 @@ rb_io_inspect(obj)
fptr = RFILE(rb_io_taint_check(obj))->fptr;
if (!fptr || !(fptr->f || fptr->f2) || !fptr->path) return rb_any_to_s(obj);
- cname = rb_class2name(CLASS_OF(obj));
+ cname = rb_obj_classname(obj);
buf = ALLOCA_N(char, strlen(cname) + strlen(fptr->path) + 5);
sprintf(buf, "#<%s:%s>", cname, fptr->path);
return rb_str_new2(buf);
@@ -2677,7 +2677,7 @@ rb_io_defset(val, id)
{
if (!rb_respond_to(val, id_write)) {
rb_raise(rb_eTypeError, "$> must have write method, %s given",
- rb_class2name(CLASS_OF(val)));
+ rb_obj_classname(val));
}
rb_defout = val;
}