From ae08fe37432bb91852f72be3f072f12bdeeea669 Mon Sep 17 00:00:00 2001 From: Sam Westerman Date: Tue, 25 Nov 2025 16:11:15 -0800 Subject: [PATCH] Update OptParse#on{,_tail,_head} to use ... --- lib/optparse.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/optparse.rb b/lib/optparse.rb index c66c842..f957889 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -1643,8 +1643,8 @@ def define(*opts, &block) # # :include: ../doc/optparse/creates_option.rdoc # - def on(*opts, &block) - define(*opts, &block) + def on(...) + define(...) self end alias def_option define @@ -1666,8 +1666,8 @@ def define_head(*opts, &block) # # The new option is added at the head of the summary. # - def on_head(*opts, &block) - define_head(*opts, &block) + def on_head(...) + define_head(...) self end alias def_head_option define_head @@ -1690,8 +1690,8 @@ def define_tail(*opts, &block) # # The new option is added at the tail of the summary. # - def on_tail(*opts, &block) - define_tail(*opts, &block) + def on_tail(...) + define_tail(...) self end alias def_tail_option define_tail