diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-22 04:09:24 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-22 04:09:24 +0000 |
| commit | ac6af07321fe42612d4d54a8c5795e02cd39036a (patch) | |
| tree | 49dec6688efd496a88df7c4cf5ed4b32ef1b4e5e /object.c | |
| parent | 03e88d8ac46156ac28d3ad14cd5025851cb15975 (diff) | |
| download | ruby-ac6af07321fe42612d4d54a8c5795e02cd39036a.tar.gz ruby-ac6af07321fe42612d4d54a8c5795e02cd39036a.tar.xz ruby-ac6af07321fe42612d4d54a8c5795e02cd39036a.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@9439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
| -rw-r--r-- | object.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1053,7 +1053,7 @@ sym_inspect(VALUE 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); } |
