mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
45fd53e0a2
commit
f5bb9115a7
Notes:
git
2020-11-16 08:25:59 +09:00
1 changed files with 6 additions and 1 deletions
5
parse.y
5
parse.y
|
@ -7788,7 +7788,12 @@ static int
|
||||||
arg_ambiguous(struct parser_params *p, char c)
|
arg_ambiguous(struct parser_params *p, char c)
|
||||||
{
|
{
|
||||||
#ifndef RIPPER
|
#ifndef RIPPER
|
||||||
|
if (c == '/') {
|
||||||
|
rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `%c' operator", WARN_I(c));
|
||||||
|
}
|
||||||
|
else {
|
||||||
rb_warning1("ambiguous first argument; put parentheses or a space even after `%c' operator", WARN_I(c));
|
rb_warning1("ambiguous first argument; put parentheses or a space even after `%c' operator", WARN_I(c));
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
|
dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue