Age | Commit message (Collapse) | Author |
|
|
|
https://hackerone.com/reports/605262
|
|
Fix the name of the macro variable introduced in 0872ea5330
from NODE_SPECIAL_EXCESSED_COMMA to NODE_SPECIAL_EXCESSIVE_COMMA.
|
|
`(ID)1` was assigned to NODE_ARGS#rest_arg for `{|x,| }`.
This change removes the magic number by introducing an explicit macro
variable for it: NODE_SPECIAL_EXCESSED_COMMA.
|
|
Terminate the input from a TTY by 2 ^D at the middle of line, like
as many programs, `cat`, `perl` and so on, do. By the first ^D,
the line will be sent without a newline, and then EOF will be send
by the next ^D.
|
|
* parse.y (tok_hex): flush token after dispatching the "invalid
hex escape" parse error.
|
|
* parse.y (here_document): adjust token to the here-doc identifier
in compile_error when a here-document misses the closing
identifier.
|
|
* parse.y: continue parsing the rest of the here-document starting
line, after the terminator was not found.
|
|
* parse.y (parse_atmark): return EXPR_END or EXPR_ENDFN, depending
on the previous state, even incomplete names consistently.
|
|
|
|
* parse.y (warn_space_char_code): warn whitespace characters
escaped with meta/control prefix.
|
|
|
|
* parse.y (parse_atmark): numbered parameter name is not allowed
as a symbol regardless the context.
|
|
|
|
* parse.y (ripper_token): added Ripper#token which returns the
current token string. [EXPERIMENTAL]
|
|
|
|
* parse.y (here_document): broke the terminator condition down
into each piece, the positional condition, resetting the
dedented here-document indentation, and matching identifier.
suppress a false warning by icc.
|
|
* parse.y (parser_yylex): adjust the error indicator of unexpected
fraction part.
before:
~~~
1.2.3
^~~
~~~
after:
~~~
1.2.3
^~
~~~
|
|
* parse.y (parser_yyerror, parser_compile_error): revert
r67224 (e5d10cda07b23682e5e4e64d1324e4d3247d4785) "Flush erred
token".
|
|
|
|
Heredocs are parsed line-by-line, so we need to keep track of the
temporary encoding of the string. Previously, a heredoc would
only detect mixed encoding errors if they were on the same line,
this changes things so they will be caught on different lines.
Fixes [Bug #15839]
|
|
|
|
|
|
|
|
|
|
Revert "Propagate parser_params to rb_yytnamerr"
This reverts commit 15f45ae4d12f14714ab3021b60887d8c7bf4b095.
|
|
|
|
This allows cases such as:
```ruby
m ->(a = ->{@1}) {a}
m.call.call(1)
m2 ->(a: ->{@1}) {a}
m2.call.call(2)
```
Previously, this would cause a syntax error.
[Bug#15789]
|
|
Because `proc{|| @1}` is a syntax error, the following should
also be syntax errors:
```ruby
proc { |
| @1}
```
```ruby
proc { |; a| @1 }
```
This fixes both cases.
[Bug #15825]
|
|
* parse.y (case_args): moved "duplicated when clause" warning from
compile phase, so that `ruby -wc` shows them.
|
|
|
|
|
|
* parse.y (heredoc_identifier): CR in here-document identifier
might or might not result in a syntax error, by the EOL code.
make a syntax error regardless of the EOL code.
|
|
* parse.y (heredoc_identifier): quoted here-document identifier
must end within the same line.
the only corner case that here-document identifier can contain a
newline is that the closing qoute is placed at the beginning of
the next line, and has been warned since 2.4.
```ruby
<<"EOS
" # warning: here document identifier ends with a newline
EOS
```
|
|
* parse.y (internal_id): number the ID serial for internal use by
counting down from the neary maximum value, not to accidentally
match permanent IDs.
[Bug #15768]
Notes:
Fixed: [Bug #15786]
|
|
|
|
|
|
[Fix GH-2139] [Bug #15783]
|
|
[Fix GH-2139] [Bug #15783]
|
|
|
|
Use NODE_SPECIAL_NO_NAME_REST instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* parse.y (parser_append_options): explicitly pass $; when auto
splitting, to suppress the warning for non-nil $;.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[ruby-core:87945] [Feature #14912]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* parse.y (rb_parser_fatal): fix "parser" in the message which was
replaced accidentally. it is not the argument name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Because hard to specify commits related to r67479 only.
So please commit again.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* parse.y (rb_parser_fatal): fix "parser" in the message which was
replaced accidentally. it is not the argument name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* parse.y: show compile error and the error line separately,
instead of building the error message by snprintf then yyerror.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|