Fix the warning message for dynamic symbol literal in condition
This commit is contained in:
parent
e25ad5475c
commit
da139317a5
2
parse.y
2
parse.y
@ -11758,7 +11758,7 @@ cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *l
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case NODE_DSYM:
|
case NODE_DSYM:
|
||||||
SWITCH_BY_COND_TYPE(type, warning, "string ")
|
SWITCH_BY_COND_TYPE(type, warning, "symbol ")
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NODE_LIT:
|
case NODE_LIT:
|
||||||
|
@ -1073,7 +1073,7 @@ eom
|
|||||||
assert_warning(/literal in condition/) do
|
assert_warning(/literal in condition/) do
|
||||||
eval('1 if :foo')
|
eval('1 if :foo')
|
||||||
end
|
end
|
||||||
assert_warning(/literal in condition/) do
|
assert_warning(/symbol literal in condition/) do
|
||||||
eval('1 if :"#{"foo".upcase}"')
|
eval('1 if :"#{"foo".upcase}"')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user