diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/optparse.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb index 6d9c46fd84..259aa06aa9 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -1549,6 +1549,7 @@ XXX end pat = Completion.regexp(word, true) visit(:each_option) do |opt| + next unless Switch === opt opts = (long ? opt.long : []) + (short ? opt.short : []) opts = Completion.candidate(word, true, pat, &opts.method(:each)).map(&:first) if pat if /\A=/ =~ opt.arg |