summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-31 11:44:49 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-31 11:44:49 +0000
commitf072d4e34a70d79a78d06616aad3658dd6b97141 (patch)
treee057c597ca1693829f73ebba7161435fc7176685 /object.c
parent0d0c31ff8414edc38417b7b172819275e03f4dc3 (diff)
Merge from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/object.c b/object.c
index fcc30bd..8135186 100644
--- a/object.c
+++ b/object.c
@@ -314,7 +314,7 @@ VALUE
rb_any_to_s(obj)
VALUE obj;
{
- char *cname = rb_obj_classname(obj);
+ const char *cname = rb_obj_classname(obj);
size_t len;
VALUE str;
@@ -341,7 +341,7 @@ inspect_i(id, value, str)
VALUE str;
{
VALUE str2;
- char *ivname;
+ const char *ivname;
/* need not to show internal data */
if (CLASS_OF(value) == 0) return ST_CONTINUE;
@@ -397,9 +397,8 @@ rb_obj_inspect(obj)
&& ROBJECT(obj)->iv_tbl->num_entries > 0) {
VALUE str;
size_t len;
- char *c;
+ const char *c = rb_obj_classname(obj);
- c = rb_obj_classname(obj);
if (rb_inspecting_p(obj)) {
len = strlen(c)+10+16+1;
str = rb_str_new(0, len); /* 10:tags 16:addr 1:nul */
@@ -1161,7 +1160,7 @@ sym_inspect(sym)
VALUE sym;
{
VALUE str;
- char *name;
+ const char *name;
ID id = SYM2ID(sym);
name = rb_id2name(id);