In Ruby 3, the new ...
syntax was introduced, allowing constructs like these:
def locked_run(...)
lock
run(...)
unlock
end
This is documented here: https://rubyreferences.github.io/rubychanges/3.0.html
After this discussion (https://bugs.ruby-lang.org/issues/16378), it was decided to let positional arguments in as well:
def block_section(name, ...)
section(name, true, ...)
end
However, the following still leads to a syntax error:
def block_section(...)
section(block_section: true, ...)
end
Why are positional arguments allowed with ...
but named arguments are not?