1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/optparse.rb: cannot put :nodoc: before method definition.

put after it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2006-12-08 09:13:04 +00:00
parent 1636105e74
commit f1b36f2997
2 changed files with 10 additions and 9 deletions

View file

@ -1,6 +1,11 @@
Fri Dec 8 18:11:18 2006 NAKAMURA Usaku <usa@ruby-lang.org>
* lib/optparse.rb: cannot put :nodoc: before method definition.
put after it.
Fri Dec 8 17:00:13 2006 NAKAMURA Usaku <usa@ruby-lang.org> Fri Dec 8 17:00:13 2006 NAKAMURA Usaku <usa@ruby-lang.org>
* bin/rdoc: ues File.exist? instead of File.exists. * bin/rdoc: ues File.exist? instead of File.exists?.
Thu Dec 7 23:50:21 2006 Yukihiro Matsumoto <matz@ruby-lang.org> Thu Dec 7 23:50:21 2006 Yukihiro Matsumoto <matz@ruby-lang.org>

View file

@ -398,8 +398,7 @@ class OptionParser
self self
end end
# :nodoc: def add_banner(to) # :nodoc:
def add_banner(to)
unless @short or @long unless @short or @long
s = desc.join s = desc.join
to << " [" + s + "]..." unless s.empty? to << " [" + s + "]..." unless s.empty?
@ -407,8 +406,7 @@ class OptionParser
to to
end end
# :nodoc: def match_nonswitch?(str) # :nodoc:
def match_nonswitch?(str)
@pattern =~ str unless @short or @long @pattern =~ str unless @short or @long
end end
@ -642,8 +640,7 @@ class OptionParser
end end
end end
# :nodoc: def add_banner(to) # :nodoc:
def add_banner(to)
list.each do |opt| list.each do |opt|
if opt.respond_to?(:add_banner) if opt.respond_to?(:add_banner)
opt.add_banner(to) opt.add_banner(to)
@ -1243,8 +1240,7 @@ class OptionParser
parse_in_order(argv, &nonopt) parse_in_order(argv, &nonopt)
end end
# :nodoc: def parse_in_order(argv = default_argv, setter = nil, &nonopt) # :nodoc:
def parse_in_order(argv = default_argv, setter = nil, &nonopt)
opt, arg, val, rest = nil opt, arg, val, rest = nil
nonopt ||= proc {|a| throw :terminate, a} nonopt ||= proc {|a| throw :terminate, a}
argv.unshift(arg) if arg = catch(:terminate) { argv.unshift(arg) if arg = catch(:terminate) {