1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix the warning message for dynamic symbol literal in condition

This commit is contained in:
Nobuyoshi Nakada 2021-10-04 12:14:27 +09:00
parent e25ad5475c
commit da139317a5
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
2 changed files with 2 additions and 2 deletions

View file

@ -11758,7 +11758,7 @@ cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *l
break;
case NODE_DSYM:
SWITCH_BY_COND_TYPE(type, warning, "string ")
SWITCH_BY_COND_TYPE(type, warning, "symbol ")
break;
case NODE_LIT:

View file

@ -1073,7 +1073,7 @@ eom
assert_warning(/literal in condition/) do
eval('1 if :foo')
end
assert_warning(/literal in condition/) do
assert_warning(/symbol literal in condition/) do
eval('1 if :"#{"foo".upcase}"')
end