| Age | Commit message (Collapse) | Author |
|
[Backport #21187]
|
|
|
|
(#13327)
* [ruby/prism] Accept a newline after the defined? keyword
[Bug #21197]
https://github.com/ruby/prism/commit/22be955ce9
* Fix a compilation error
Co-authored-by: Stan Lo <stan001212@gmail.com>
---------
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
Co-authored-by: Stan Lo <stan001212@gmail.com>
|
|
[Backport #21197]"
This reverts commit e630a0f7ae909dafe2e1dbc47baf90cd795b4a5f.
|
|
[ruby/prism] Accept a newline after the defined? keyword
[Bug #21197]
https://github.com/ruby/prism/commit/22be955ce9
|
|
Fixes [Bug #21145]
https://github.com/ruby/prism/commit/be2d845639
|
|
[ruby/prism] Fix infinite loop in error recovery
When recovering from a depth error that occurs at the end of the
file, we need to break out of parsing statements.
Fixes [Bug #21114]
https://github.com/ruby/prism/commit/a32e268787
|
|
[ruby/prism] No writing to numbered parameters
Fixes [Bug #21117]
https://github.com/ruby/prism/commit/19d4bab5a0
|
|
ca81142eff98cccb03ff523322aefe4e7346fd0e: [Backport #21010]
[ruby/prism] Throw syntax error for endless method with `[]=`
Prism shoudld throw a syntax error for endless methods when the method
name uses brackets. Previously it would not. This matches the behavior
of parse.y.
Fixes https://bugs.ruby-lang.org/issues/21010
https://github.com/ruby/prism/commit/43c16a89ef
[ruby/prism] [Bug #21010] Reject endless method definition of `[]=`
Fixes: https://bugs.ruby-lang.org/issues/20785
https://github.com/ruby/prism/commit/192960ce5d
|
|
Prism was already disallowing arguments after block args, but in
parse.y, any comma after a block arg is a syntax error. This moves the
error handling into `PM_TOKEN_UAMPERSAND` where we can check if the
current type is `PM_TOKEN_COMMA`then raise an error. I've also updated
the tests to include the examplesfrom ruby/prism#3112.
Fixes: ruby/prism#3112
https://github.com/ruby/prism/commit/754cf8eddc
Notes:
Merged: https://github.com/ruby/ruby/pull/12358
|
|
Actually close [Bug #20952]
Notes:
Merged: https://github.com/ruby/ruby/pull/12343
|
|
Fixes [Bug #20952]
Notes:
Merged: https://github.com/ruby/ruby/pull/12342
|
|
Raise an exception when the same numbered param is used inside a child
block. For example, the following code should be a syntax error:
```ruby
-> { _1 + -> { _1 } }
```
Fixes https://github.com/ruby/prism/pull/3291
https://github.com/ruby/prism/commit/d4fc441838
|
|
If we hit an EOF token, and the character before the EOF is a newline,
we should make EOF token start at the previous newline. That way any
errors reported will occur on that line.
For example "foo(\n" should report an error on line 1 even though the
EOF technically occurs on line 2.
[Bug #20918]
https://bugs.ruby-lang.org/issues/20918
https://github.com/ruby/prism/commit/60bc43de8e
|
|
required
Partially fixes: #3171
https://github.com/ruby/prism/commit/d0d9699c27
|
|
match required
Partially fixes: https://github.com/ruby/prism/issues/3171
https://github.com/ruby/prism/commit/5c33fa5a1a
|
|
Fixes: https://github.com/ruby/prism/issues/3109
https://github.com/ruby/prism/commit/9ed989c30d
|
|
https://github.com/ruby/prism/commit/70c1cd480f
|
|
https://github.com/ruby/prism/commit/232a02acef
|
|
https://github.com/ruby/prism/commit/3a0b1c6110
|
|
https://github.com/ruby/prism/commit/dbd5c929d6
|
|
https://github.com/ruby/prism/commit/023e894b74
|
|
https://github.com/ruby/prism/commit/80cd335222
|
|
https://github.com/ruby/prism/commit/5dd36b979e
|
|
https://github.com/ruby/prism/commit/aee2de91a3
|
|
https://github.com/ruby/prism/commit/ccc746f918
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11753
|
|
https://github.com/ruby/prism/commit/498dd922d4
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11741
|
|
https://github.com/ruby/prism/commit/fd58d6a9ea
|
|
https://github.com/ruby/prism/commit/976a3cd0a5
|
|
https://github.com/ruby/prism/commit/988ac82187
|
|
https://github.com/ruby/prism/commit/509ff88e92
|
|
https://github.com/ruby/prism/commit/b624e09cc6
|
|
When we encounter an invalid unicode escape within a regular
expression, we now pass that error on to Onigmo as if it didn't
exist in the parser (which matches the upstream parser's behavior).
We do this because there are tests that specify that you are
allowed to have invalid Unicode escapes if they are within the
context of a regular expression comment for a regular expression
in extended mode. That looks like:
/# \u /x
Note that this _only_ applies to Unicode escapes (as opposed to
applying to hex or meta/control escapes as well). Importantly it
also only applies if the regular expression is terminated. An
unterminated regular expression will still get error handling done
in the parser. That would look like:
/# \u
that would result in the same error handling we have today.
https://github.com/ruby/prism/commit/fb98034806
|
|
https://github.com/ruby/prism/commit/9f1f7d08bd
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11234
|
|
https://github.com/ruby/prism/commit/4cc0eda4ca
|
|
https://github.com/ruby/prism/commit/fb7e1ebb7f
|