Issue #18267 has been updated by byroot (Jean Boussier).


It was known when the feature was introduced https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/d1ae2bc27fd4183e6abb9e83691e192bfe1e5316/diff, @mame added a NEWS entry specifically for it.

I presume it would clash with endless ranges?

----------------------------------------
Bug #18267: Argument forwarding requires parenthesis on method definitions
https://bugs.ruby-lang.org/issues/18267#change-94332

* Author: tenderlovemaking (Aaron Patterson)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.0dev (2021-10-21T22:47:38Z master 844588f915) [x86_64-darwin20]
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
I like to write my method definitions without parenthesis.  For example:

```ruby
def foo bar
  # ...
end
```

I tried to use `...`, but it doesn't work.  For example if I do:

```ruby
def call a, ...
  a.nil?(...)
end
```

It will be a syntax error, and the program exits.  Can we make this syntax work so that I can always omit parenthesis?

Thank you!



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>