We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ruby/ruby@e369884
The text was updated successfully, but these errors were encountered:
Disallow anonymous block within argument forwarding
For parser, this is already the case since argument forwarding was introduced:
parser
$ ruby -cve 'def f(...); g(&); end' ruby 3.1.6p260 (2024-05-29 revision a777087be6) [x86_64-linux] Syntax OK $ ruby-parse --31 -e "def f(...); g(&); end" (fragment:0):1:15: error: no anonymous block parameter (fragment:0):1: def f(...); g(&); end (fragment:0):1: ^
I guess, should be allowed for those earlier versions but I'm not going to look into it further than this for now.
def test_anonymous_blockarg_with_arg_forwarding assert_diagnoses( [:error, :no_anonymous_blockarg], %q{def foo(...); bar(&); end}, %q{ ^ location}, SINCE_3_1) end
Sorry, something went wrong.
No branches or pull requests
ruby/ruby@e369884
The text was updated successfully, but these errors were encountered: