Fix ruby -w warnings for mismatched indentation discovered by rdoc

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2008-09-23 18:16:08 +00:00
Родитель f3ba845deb
Коммит 563b654437
5 изменённых файлов: 19 добавлений и 12 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Wed Sep 24 03:08:58 2008 Eric Hodel <drbrain@segment7.net>
* lib/uri/mailto.rb: fix indentation.
* lib/uri/generic.rb: ditto.
* lib/yaml.rb: ditto.
* lib/uri/cgi/core.rb: fix indentation and ambiguous argument warning.
Tue Sep 23 23:39:25 2008 James Edward Gray II <jeg2@ruby-lang.org> Tue Sep 23 23:39:25 2008 James Edward Gray II <jeg2@ruby-lang.org>
* lib/csv/csv.rb: Improved the idea of whitespace and word characters used * lib/csv/csv.rb: Improved the idea of whitespace and word characters used

Просмотреть файл

@ -217,14 +217,14 @@ class CGI
buf << "Set-Cookie: #{cookie}#{EOL}" buf << "Set-Cookie: #{cookie}#{EOL}"
when Array when Array
arr = cookie arr = cookie
arr.each {|cookie| buf << "Set-Cookie: #{cookie}#{EOL}" } arr.each {|c| buf << "Set-Cookie: #{c}#{EOL}" }
when Hash when Hash
hash = cookie hash = cookie
hash.each {|name, cookie| buf << "Set-Cookie: #{cookie}#{EOL}" } hash.each {|name, c| buf << "Set-Cookie: #{c}#{EOL}" }
end end
end end
if @output_cookies if @output_cookies
@output_cookies.each {|cookie| buf << "Set-Cookie: #{cookie}#{EOL}" } @output_cookies.each {|c| buf << "Set-Cookie: #{c}#{EOL}" }
end end
## other headers ## other headers
options.each do |key, value| options.each do |key, value|
@ -463,9 +463,9 @@ class CGI
/Content-Disposition:.* filename=(?:"((?:\\.|[^\"])*)"|([^;\s]*))/i.match(head) /Content-Disposition:.* filename=(?:"((?:\\.|[^\"])*)"|([^;\s]*))/i.match(head)
filename = ($1 or $2 or "") filename = ($1 or $2 or "")
if /Mac/i.match(env_table['HTTP_USER_AGENT']) and if /Mac/i =~ env_table['HTTP_USER_AGENT'] and
/Mozilla/i.match(env_table['HTTP_USER_AGENT']) and /Mozilla/i =~ env_table['HTTP_USER_AGENT'] and
(not /MSIE/i.match(env_table['HTTP_USER_AGENT'])) /MSIE/i !~ env_table['HTTP_USER_AGENT']
filename = CGI::unescape(filename) filename = CGI::unescape(filename)
end end

Просмотреть файл

@ -516,7 +516,7 @@ module URI
if v && v != '' && @parser.regexp[:QUERY] !~ v if v && v != '' && @parser.regexp[:QUERY] !~ v
raise InvalidComponentError, raise InvalidComponentError,
"bad component(expected query component): #{v}" "bad component(expected query component): #{v}"
end end
return true return true
end end

Просмотреть файл

@ -135,7 +135,7 @@ module URI
@headers = [] @headers = []
if MAILTO_REGEXP =~ @opaque if MAILTO_REGEXP =~ @opaque
if arg[-1] if arg[-1]
self.to = $1 self.to = $1
self.headers = $2 self.headers = $2
else else

Просмотреть файл

@ -213,7 +213,7 @@ module YAML
# end # end
# end # end
# #
def YAML.each_document( io, &block ) def YAML.each_document( io, &block )
yp = parser.load_documents( io, &block ) yp = parser.load_documents( io, &block )
end end
@ -228,7 +228,7 @@ module YAML
# end # end
# end # end
# #
def YAML.load_documents( io, &doc_proc ) def YAML.load_documents( io, &doc_proc )
YAML.each_document( io, &doc_proc ) YAML.each_document( io, &doc_proc )
end end
@ -243,7 +243,7 @@ module YAML
# end # end
# end # end
# #
def YAML.each_node( io, &doc_proc ) def YAML.each_node( io, &doc_proc )
yp = generic_parser.load_documents( io, &doc_proc ) yp = generic_parser.load_documents( io, &doc_proc )
end end
@ -258,7 +258,7 @@ module YAML
# end # end
# end # end
# #
def YAML.parse_documents( io, &doc_proc ) def YAML.parse_documents( io, &doc_proc )
YAML.each_node( io, &doc_proc ) YAML.each_node( io, &doc_proc )
end end