diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-06 13:47:19 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-06 13:47:19 +0000 |
commit | 76c286d19581e2339782e7c8b4744dd2cdb8df17 (patch) | |
tree | 49bee8ddf797c930cf97d683e4731b14e84d4927 /lib | |
parent | 6c715d1de8f170822197dfce7f794e9919e0c92d (diff) | |
download | ruby-76c286d19581e2339782e7c8b4744dd2cdb8df17.tar.gz |
* lib/optparse.rb (OptionParser#candidate): skip separators.
* sample/optparse/opttest.rb: should not override --help.
[ruby-dev:42690]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 |