summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-16 09:13:20 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-16 09:13:20 +0000
commit8353f303e3c1109e04ef47707df3b7d84b12c5fe (patch)
tree33bc2638db8c9dac5e94b0d6fa9af090c45774b8 /object.c
parent525836d683d8c0cc2ff2479875eb9e71bd63d151 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/object.c b/object.c
index 353d322..0e2285e 100644
--- a/object.c
+++ b/object.c
@@ -198,12 +198,12 @@ rb_obj_inspect(obj)
c = rb_class2name(CLASS_OF(obj));
if (rb_inspecting_p(obj)) {
- str = rb_str_new(0, strlen(c)+8+16+1); /* 8:tags 16:addr 1:eos */
+ str = rb_str_new(0, strlen(c)+10+16+1); /* 10:tags 16:addr 1:eos */
sprintf(RSTRING(str)->ptr, "#<%s:0x%lx ...>", c, obj);
RSTRING(str)->len = strlen(RSTRING(str)->ptr);
return str;
}
- str = rb_str_new(0, strlen(c)+4+16+1); /* 4:tags 16:addr 1:eos */
+ str = rb_str_new(0, strlen(c)+6+16+1); /* 6:tags 16:addr 1:eos */
sprintf(RSTRING(str)->ptr, "-<%s:0x%lx ", c, obj);
RSTRING(str)->len = strlen(RSTRING(str)->ptr);
return rb_protect_inspect(inspect_obj, obj, str);
@@ -498,8 +498,8 @@ sym_inspect(sym)
VALUE str;
char *name;
- str = rb_str_new(0, strlen(name)+2);
name = rb_id2name(SYM2ID(sym));
+ str = rb_str_new(0, strlen(name)+2);
sprintf(RSTRING(str)->ptr, ":%s", name);
RSTRING(str)->len = strlen(RSTRING(str)->ptr);
return str;