summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/object.c b/object.c
index 34a17ddc91..071dfb1bab 100644
--- a/object.c
+++ b/object.c
@@ -513,8 +513,8 @@ sym_inspect(sym)
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);
+ RSTRING(str)->ptr[0] = ':';
+ strcpy(RSTRING(str)->ptr+1, name);
return str;
}