summaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
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 3aef27814..10ae9bb8f 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));