summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-22 04:09:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-22 04:09:24 +0000
commit1cc1c2f77e9bcb66afc403e805c2be0088e3095a (patch)
tree91d0af7f1c0a88817d1d088b1010c891f8149301 /object.c
parent0e851c5288a26efe252792f77a931e0787c87cca (diff)
* object.c (sym_inspect), parse.y (parser_yylex, rb_symname_p): check
if valid as a symbol name more strictly. [ruby-dev:27478] * test/ruby/test_symbol.rb: tests for [ruby-core:03573]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index facdb58..837e74c 100644
--- a/object.c
+++ b/object.c
@@ -1174,7 +1174,7 @@ sym_inspect(sym)
str = rb_str_new(0, strlen(name)+1);
RSTRING(str)->ptr[0] = ':';
strcpy(RSTRING(str)->ptr+1, name);
- if (rb_is_junk_id(id)) {
+ if (!rb_symname_p(name)) {
str = rb_str_dump(str);
strncpy(RSTRING(str)->ptr, ":\"", 2);
}