Age | Commit message (Collapse) | Author |
|
ce7a053475cbebfb2f3e5ed6614e0ba631541917,1cbb1f1720127b0b34b38c77e27b51b182008699: [Backport #16695]
Adjust sp for `x = false; y = (return until x unless x)` [Bug #16695]
---
compile.c | 8 +++-----
test/ruby/test_syntax.rb | 9 +++++++++
2 files changed, 12 insertions(+), 5 deletions(-)
test/ruby/test_syntax.rb: avoid "warning: assigned but unused
variable"
---
test/ruby/test_syntax.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Implements [Feature #16378]
|
|
Fixed argument forwarding in reserved word method [Bug #16854]
|
|
commit c98c492578d898dc07a04b8240d8d5b1508ffafa
Author: Nobuyoshi Nakada <nobu@ruby-lang.org>
Date: Fri Jan 17 16:56:53 2020 +0900
Added test for f38b3e8c707ebdcad05aa9485cf1760640b74fbb
commit f38b3e8c707ebdcad05aa9485cf1760640b74fbb
Author: Nobuyoshi Nakada <nobu@ruby-lang.org>
Date: Thu Jan 16 18:34:31 2020 +0900
Fixed the location of args node with numbered parameter
|
|
warnings
|
|
(old)
test.rb:4: warning: The last argument is used as the keyword parameter
test.rb:1: warning: for `foo' defined here; maybe ** should be added to the call?
(new)
test.rb:4: warning: The last argument is used as keyword parameters; maybe ** should be added to the call
test.rb:1: warning: The called method `foo' is defined here
|
|
[Bug #16438]
|
|
[Bug #16438]
|
|
|
|
[Feature #16433]
|
|
This reverts commit 67c574736912003c377218153f9d3b9c0c96a17b.
[Feature #16275]
|
|
|
|
|
|
This reverts commit 69ec3f70fab0c1c537c68fb135cc315181b1d750.
|
|
This reverts commit 6eaac7cfac668d6669be694fd7b723c4982ed218.
|
|
|
|
|
|
|
|
|
|
|
|
Get rid of these redundant and useless warnings.
```
$ ruby -e 'def bar(a) a; end; def foo(...) bar(...) end; foo({})'
-e:1: warning: The last argument is used as the keyword parameter
-e:1: warning: for `foo' defined here
-e:1: warning: The keyword argument is passed as the last hash parameter
-e:1: warning: for `bar' defined here
```
|
|
|
|
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2575
|
|
Fixes [Bug #10314]
Notes:
Merged: https://github.com/ruby/ruby/pull/2569
|
|
* parse.y (struct local_vars): moved numbered parameter NODEs for
nesting check to separate per local variable scopes, as numbered
parameters should belong to local variable scopes. [Bug #16248]
|
|
return directly in class/module is an error, so return in
proc in class/module should also be an error. I believe the
previous behavior was an unintentional oversight during the
addition of top-level return in 2.4.
Notes:
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
* `_1` (and no other numbered parameters) to work as `|x|`.
* giving up `_0`.
[ruby-core:95074] [Bug #16178]
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2431
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2431
|
|
|
|
|
|
This is broken at least since 2.5 (I didn't check earlier versions).
It resulted in failure in test_ast.rb when the tests were added before
the parser change.
Basically, in remove_duplicate_keys, if the node is modified, set
the location information to the previous location information. The
removal of keys should not affect the location in the code.
Notes:
Merged: https://github.com/ruby/ruby/pull/2428
|
|
Ignore empty keyword splats in arrays
Notes:
Merged: https://github.com/ruby/ruby/pull/2418
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2395
|
|
This syntax means the method should be treated as a method that
uses keyword arguments, but no specific keyword arguments are
supported, and therefore calling the method with keyword arguments
will raise an ArgumentError. It is still allowed to double splat
an empty hash when calling the method, as that does not pass
any keyword arguments.
Notes:
Merged: https://github.com/ruby/ruby/pull/2395
|
|
Now that keyword splats accept non-Symbols, the type of exception
changes.
Previously, a TypeError (hash key "k1" is not a Symbol) was raised
for this test, but now an ArgumentError (unknown keyword: "k1") is
raised.
Notes:
Merged: https://github.com/ruby/ruby/pull/2395
|
|
|
|
This reverts commits:
* d365fd5a024254d7c105a62a015a7ea29ccf3e5d
* d780c3662484d6072b3a6945b840049de72c2096
* aa7211836b769231a2a8ef6b6ec2fd0ec882ef29
* 043f010c28e82ea38978bf8ed885416f133b5b75
* bb4dd7c6af05c7821d572e2592ea3d0cc748d81f
* 043f010c28e82ea38978bf8ed885416f133b5b75
* f169043d81524b5b529f2c1e9c35437ba5bc3a7a
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/94645
|
|
Fixes [Bug #14062]
|
|
This reverts commit bae638ad5b782c44c80efe33834cb9039279af46.
[Feature #5400]
|
|
Fixes [Bug #15985]
|
|
* parse.y (value_expr_check): `then` or `else` only `if` is not a
void value expression, as the counterpart is evaluated as `nil`.
[Bug #15932]
|
|
* parse.y (value_expr_check): if either of `then` or `else`
statements is not a void value expression, the whole `if` is not
also a void value expression. [Bug #15932]
|
|
|
|
|
|
|