diff options
-rw-r--r-- | lib/optparse.rb | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -413,7 +413,7 @@ class OptionParser candidates = [] block.call do |k, *v| (if Regexp === k - kn = nil k === key else kn = defined?(k.id2name) ? k.id2name : k @@ -1336,6 +1336,7 @@ XXX default_pattern = nil klass = nil q, a = nil opts.each do |o| # argument class @@ -1414,6 +1415,8 @@ XXX if a default_style = default_style.guess(arg = a) default_pattern, conv = search(:atype, o) unless default_pattern end sdesc << "-#{q}" short << Regexp.new(q) @@ -1436,6 +1439,9 @@ XXX default_pattern, conv = search(:atype, default_style.pattern) unless default_pattern if !(short.empty? and long.empty?) s = (style || default_style).new(pattern || default_pattern, conv, sdesc, ldesc, arg, desc, block) elsif !block |