Skip to content

Conversation

@sw-square
Copy link

@sw-square sw-square commented Nov 26, 2025

This updates OptParse#on, OptParse#on_tail, and OptParse#on_head to use ....

Explicitly forwarding *opts, &block doesn't work with keyword arguments anymore, so I have to do def on(...) = define(...) in all my subclasses whenever I want to redefine define.

While this is backwards incompatible (rubies that don't understand ... won't work), ruby 2.7 (which introduced ...) has been EOL for over 2 and a half years.

There's a few other places in the file which could benefit from this (eg OptParse#parse's keywords argument), but I want to do a minimal PR which won't have any breaking changes.

@sw-square
Copy link
Author

I've gone ahead and made changes to all places which could benefit from ... in #116, which includes the changes made in this PR; if 116 is accepted, this PR can be closed

@nobu
Copy link
Member

nobu commented Nov 26, 2025

After dropping support for 2.6 and before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants