| Age | Commit message (Collapse) | Author |
|
[Bug #20468] Fix safe navigation in `for` variable
|
|
[Bug #20280]
Backport of #10014.
|
|
[Bug #20180]
Backports #9624.
|
|
merge revision(s) 596db9c1f486d6609a4e97d82c8c71b54609fb6f: [Backport #20090]
[Feature #19370] Blocks without anonymous parameters should not
affect
---
parse.y | 4 ++--
test/ruby/test_syntax.rb | 7 +++++++
2 files changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
|
|
At the method definition, the local scope that saves the context of
the numbered parameters needs to be pushed before saving.
|
|
|
|
Since Ruby 2.4, `return` is supported at toplevel. This makes `eval "return"`
also supported at toplevel.
This mostly uses the same tests as direct `return` at toplevel, with a couple
differences:
`END {return if false}` is a SyntaxError, but `END {eval "return" if false}`
is not an error since the eval is never executed. `END {return}` is a
SyntaxError, but `END {eval "return"}` is a LocalJumpError.
The following is a SyntaxError:
```ruby
class X
nil&defined?0--begin e=no_method_error(); return; 0;end
end
```
However, the following is not, because the eval is never executed:
```ruby
class X
nil&defined?0--begin e=no_method_error(); eval "return"; 0;end
end
```
Fixes [Bug #19779]
|
|
https://bugs.ruby-lang.org/issues/18980
|
|
|
|
|
|
|
|
call
Allow compstmt in the first argument of command call wrapped with parenthesis
like following arguments with parenthesis.
Notes:
Merged: https://github.com/ruby/ruby/pull/8347
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8343
|
|
assert_separately adds --disable=gems so we don't need to add
--disable-gems when calling assert_separately.
Notes:
Merged: https://github.com/ruby/ruby/pull/8162
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8093
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7810
|
|
Preserve numbered parameters context across method definitions
|
|
|
|
[Feature #19134]
Notes:
Merged: https://github.com/ruby/ruby/pull/6934
|
|
https://bugs.ruby-lang.org/issues/19134?next_issue_id=19133&prev_issue_id=19135#note-4
|
|
[Feature #19134]
Notes:
Merged: https://github.com/ruby/ruby/pull/6818
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6761
|
|
Fixes [Bug #19132]
Notes:
Merged: https://github.com/ruby/ruby/pull/6743
|
|
Fixes case where Object includes a module that defines a constant,
then using class/module keyword to define the same constant on
Object itself.
Implements [Feature #18832]
Notes:
Merged: https://github.com/ruby/ruby/pull/6048
|
|
Do not override the input string encoding at the time of preparation,
the source encoding is not determined from the input yet.
Notes:
Merged: https://github.com/ruby/ruby/pull/6015
|
|
Record block ID before vtable_pop, so the incorrect one doesn't
override it.
Fixes [Bug #18673]
Notes:
Merged: https://github.com/ruby/ruby/pull/5761
|
|
This allows for the following syntax:
```ruby
def foo(*)
bar(*)
end
def baz(**)
quux(**)
end
```
This is a natural addition after the introduction of anonymous
block forwarding. Anonymous rest and keyword rest arguments were
already supported in method parameters, this just allows them to
be used as arguments to other methods. The same advantages of
anonymous block forwarding apply to rest and keyword rest argument
forwarding.
This has some minor changes to #parameters output. Now, instead
of `[:rest], [:keyrest]`, you get `[:rest, :*], [:keyrest, :**]`.
These were already used for `...` forwarding, so I think it makes
it more consistent to include them in other cases. If we want to
use `[:rest], [:keyrest]` in both cases, that is also possible.
I don't think the previous behavior of `[:rest], [:keyrest]` in
the non-... case and `[:rest, :*], [:keyrest, :**]` in the ...
case makes sense, but if we did want that behavior, we'll have to
make more substantial changes, such as using a different ID in the
... forwarding case.
Implements [Feature #18351]
Notes:
Merged: https://github.com/ruby/ruby/pull/5148
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5269
|
|
block to another method without having to provide a name for the
block parameter.
Implements [Feature #11256]
Co-authored-by: Yusuke Endoh mame@ruby-lang.org
Co-authored-by: Nobuyoshi Nakada nobu@ruby-lang.org
Notes:
Merged: https://github.com/ruby/ruby/pull/5051
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5065
|
|
Fixes [Bug #17719]
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Ivo Anjo <ivo@ivoanjo.me>
Notes:
Merged: https://github.com/ruby/ruby/pull/4969
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4705
|
|
This change allows `def hello = puts "Hello"` without parentheses.
Note that `private def hello = puts "Hello"` does not parse for
technical reason.
[Feature #17398]
|
|
It is now strange to test Complex in a class named Rational_Test.
Notes:
Merged: https://github.com/ruby/ruby/pull/4469
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3704
|
|
[Feature #17260] One-line pattern matching using tASSOC
R-assignment is rejected instead.
Notes:
Merged-By: nobu <nobu@ruby-lang.org>
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3445
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3445
|
|
Also unwrap NODE_RIPPER to check the method name.
Notes:
Merged: https://github.com/ruby/ruby/pull/3649
|
|
https://bugs.ruby-lang.org/issues/16746#note-26
Notes:
Merged: https://github.com/ruby/ruby/pull/3479
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3163
|