diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-13 02:16:27 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-13 02:16:27 +0000 |
| commit | 05b9a9f3816859058b2f0d0e0bcdafdc741f4dc1 (patch) | |
| tree | 752643eb9d7d0dcc855cafbc6563134d3139db00 /parse.y | |
| parent | 9835ee3c8e67c1ee121dbe3493e5da7c06f178b0 (diff) | |
| download | ruby-05b9a9f3816859058b2f0d0e0bcdafdc741f4dc1.tar.gz ruby-05b9a9f3816859058b2f0d0e0bcdafdc741f4dc1.tar.xz ruby-05b9a9f3816859058b2f0d0e0bcdafdc741f4dc1.zip | |
* parse.y (dsym): convert also literals containing NUL to
symbol.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -3864,12 +3864,9 @@ dsym : tSYMBEG xstring_contents tSTRING_END yyerror("empty symbol literal"); break; } - if (strlen(RSTRING_PTR(lit)) == RSTRING_LEN(lit)) { - $$->nd_lit = ID2SYM(rb_intern(RSTRING_PTR($$->nd_lit))); - nd_set_type($$, NODE_LIT); - break; - } - /* fall through */ + $$->nd_lit = ID2SYM(rb_intern2(RSTRING_PTR(lit), RSTRING_LEN(lit))); + nd_set_type($$, NODE_LIT); + break; default: $$ = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST($$)); break; |
