зеркало из https://github.com/github/ruby.git
* lib/optparse.rb (OptionParser::Completion::complete): wrong
Regexp for word boundary. pointed out by Gavin Sinclair. * lib/optparse.rb (OptionParser::make_switch): [no-] prefix was missing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
d4e661b4ad
Коммит
07507fe37a
|
@ -1,3 +1,11 @@
|
|||
Sat Dec 20 16:07:14 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/optparse.rb (OptionParser::Completion::complete): wrong
|
||||
Regexp for word boundary. pointed out by Gavin Sinclair.
|
||||
|
||||
* lib/optparse.rb (OptionParser::make_switch): [no-] prefix was
|
||||
missing.
|
||||
|
||||
Sat Dec 20 11:40:10 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/yaml.rb (YAML::YAML): adjust Marshal version.
|
||||
|
|
|
@ -80,7 +80,7 @@ Keyword completion module.
|
|||
completion pattern.
|
||||
=end #'#"#`#
|
||||
def complete(key, pat = nil)
|
||||
pat ||= Regexp.new('\A' + Regexp.quote(key).gsub(/\w+(?=.)/, '\&\w*'),
|
||||
pat ||= Regexp.new('\A' + Regexp.quote(key).gsub(/\w+\b/, '\&\w*'),
|
||||
ignore_case?)
|
||||
canon, sw, k, v, cn = nil
|
||||
candidates = []
|
||||
|
@ -1034,7 +1034,7 @@ Default options, which never appear in option summary.
|
|||
default_style = default_style.guess(arg = a)
|
||||
default_pattern, conv = search(:atype, o) unless default_pattern
|
||||
end
|
||||
ldesc << "--#{q}"
|
||||
ldesc << "--[no-]#{q}"
|
||||
long << (o = q.downcase)
|
||||
not_pattern, not_conv = search(:atype, FalseClass) unless not_style
|
||||
not_style = Switch::NoArgument
|
||||
|
|
Загрузка…
Ссылка в новой задаче