summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-17 14:01:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-17 14:01:57 +0000
commitf87abaadcc91b775a5e3c7ee3292d5316e985893 (patch)
tree7d48abe11198bdbbae98d25e2eb89894ffb91c9e /parse.y
parent8a442aa52ada40011e314676380a0e7c0011927e (diff)
* parse.y (dsym): garbage returned. (ruby-bugs-ja:PR#358)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 1 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 3aef278..10ae9bb 100644
--- a/parse.y
+++ b/parse.y
@@ -1978,11 +1978,10 @@ sym : fname
dsym : tSYMBEG xstring_contents tSTRING_END
{
lex_state = EXPR_END;
- if (!$2) {
+ if (!($$ = $2)) {
yyerror("empty symbol literal");
}
else {
- $$ = $2;
switch (nd_type($$)) {
case NODE_STR:
$$->nd_lit = ID2SYM(rb_intern(RSTRING($$->nd_lit)->ptr));