| Age | Commit message (Collapse) | Author |
|
When there are nested capture variables inside of a pattern match
that has an alternation pattern, it is a syntax error. Currently it
only adds a syntax error when it is at the top level of the pattern.
|
|
Fixes [Bug #21661]
https://github.com/ruby/prism/commit/475fa46a82
|
|
Should fail even with `-c` option.
|
|
type. Since a endless method is started with `=`, there was ambiguity here. We have to simply reject these in all cases.
This adds a new error for the following reason:
* `def foo arg = nil` is interpreted as a normal method call with optional `arg` without matching `end`
* `def foo *arg = nil; end` is interpreted as a endless method call that has body `nil` with extraneous `end`
`def foo *arg = nil` is somewhere inbetween and I don't know how to otherwise indicate the error.
Now the second case above also shows the newly added error message.
Fixes [Bug #21623]
https://github.com/ruby/prism/commit/e1910d4492
|
|
command calls
https://github.com/ruby/prism/commit/d9151b8a82
|
|
A command-call-like `not true` must be rejected after `&&` and `||`.
https://bugs.ruby-lang.org/issues/21337
https://github.com/ruby/prism/commit/0513cf22ad
|
|
command calls
https://github.com/ruby/prism/commit/d9151b8a82
|
|
A command-call-like `not true` must be rejected after `&&` and `||`.
https://bugs.ruby-lang.org/issues/21337
https://github.com/ruby/prism/commit/0513cf22ad
|
|
Fix https://bugs.ruby-lang.org/issues/20977
Notes:
Merged: https://github.com/ruby/ruby/pull/12424
|
|
https://github.com/ruby/prism/commit/023e894b74
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11753
|
|
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/b624e09cc6
|
|
https://github.com/ruby/prism/commit/a474017bbe
|
|
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
|
|
https://github.com/ruby/prism/commit/5d5bf92be8
|
|
prefixed values
This commit prevents the following unary operators from being accepted
as the value prefix of a block's optional parameter:
- `+`
- `-`
- `~`
- `!`
For example, `f { |a = +b| }` will now raise a syntax error.
https://github.com/ruby/prism/commit/3024bee60c
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
|
|
https://github.com/ruby/prism/commit/035890a839
|
|
https://github.com/ruby/prism/commit/f59295938b
|
|
https://github.com/ruby/prism/commit/73669b59f6
|
|
https://github.com/ruby/prism/commit/fe34a77df2
|
|
https://github.com/ruby/prism/commit/e0e8bba8be
|
|
Blocks and keywords are allowed in regular index.
Also update NEWS to make this more clear.
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
https://github.com/ruby/prism/commit/54316fd8a0
|
|
https://github.com/ruby/prism/commit/53bbcfe513
|
|
https://github.com/ruby/prism/commit/c386ba6d48
|
|
https://github.com/ruby/prism/commit/6258c3695f
|
|
https://github.com/ruby/prism/commit/ab43b3ab66
|
|
https://github.com/ruby/prism/commit/0ef5658dcc
|
|
https://github.com/ruby/prism/commit/8d4c5c2bca
|
|
https://github.com/ruby/prism/commit/178d4f66fd
|
|
https://github.com/ruby/prism/commit/863197629c
|
|
https://github.com/ruby/prism/commit/826657232e
|
|
https://github.com/ruby/prism/commit/3af1acd5da
|
|
https://github.com/ruby/prism/commit/623a0bb995
|
|
https://github.com/ruby/prism/commit/b20e37e82e
|
|
https://github.com/ruby/prism/commit/c1b07ec11b
|
|
https://github.com/ruby/prism/commit/60dbf60f48
|
|
https://github.com/ruby/prism/commit/bdd509c6ac
|
|
hash patterns
https://github.com/ruby/prism/commit/31f0201bae
|
|
https://github.com/ruby/prism/commit/8c984b6922
|
|
https://github.com/ruby/prism/commit/e893bc2230
|
|
https://github.com/ruby/prism/commit/1c3b48fedb
|
|
https://github.com/ruby/prism/commit/80dbe035ba
|
|
https://github.com/ruby/prism/commit/b1917adac7
|
|
https://github.com/ruby/prism/commit/5beeae076f
|