8000 Enhance to support 'Set' object as an enum by kwatch · Pull Request #76 · ruby/optparse · GitHub
[go: up one dir, main page]

Skip to content

Enhance to support 'Set' object as an enum #76

New issue

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

Merged
merged 3 commits into from
Jun 29, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
Next Next commit
Enhance to support 'Set' object as an enum
  • Loading branch information
kwatch committed Oct 3, 2024
commit d5b28525ecf3378da2a24a56e24cf40833f85ce0
3 changes: 2 additions & 1 deletion lib/optparse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#
# See OptionParser for documentation.
#
require 'set' unless defined?(Set)

#--
# == Developer Documentation (not for RDoc output)
Expand Down Expand Up @@ -1494,7 +1495,7 @@ def make_switch(opts, block = nil)
case o
when Proc, Method
block = notwice(o, block, 'block')
when Array, Hash
when Array, Hash, Set
case pattern
when CompletingHash
when nil
Expand Down
0