ruby-changes:7973
From: drbrain <ko1@a...>
Date: Wed, 24 Sep 2008 03:16:31 +0900 (JST)
Subject: [ruby-changes:7973] Ruby:r19495 (trunk): Fix ruby -w warnings for mismatched indentation discovered by rdoc
drbrain 2008-09-24 03:16:08 +0900 (Wed, 24 Sep 2008) New Revision: 19495 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19495 Log: Fix ruby -w warnings for mismatched indentation discovered by rdoc Modified files: trunk/ChangeLog trunk/lib/cgi/core.rb trunk/lib/uri/generic.rb trunk/lib/uri/mailto.rb trunk/lib/yaml.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 19494) +++ ChangeLog (revision 19495) @@ -1,3 +1,10 @@ +Wed Sep 24 03:08:58 2008 Eric Hodel <drbrain@s...> + + * 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@r...> * lib/csv/csv.rb: Improved the idea of whitespace and word characters used Index: lib/uri/mailto.rb =================================================================== --- lib/uri/mailto.rb (revision 19494) +++ lib/uri/mailto.rb (revision 19495) @@ -135,7 +135,7 @@ @headers = [] if MAILTO_REGEXP =~ @opaque - if arg[-1] + if arg[-1] self.to = $1 self.headers = $2 else Index: lib/uri/generic.rb =================================================================== --- lib/uri/generic.rb (revision 19494) +++ lib/uri/generic.rb (revision 19495) @@ -516,7 +516,7 @@ if v && v != '' && @parser.regexp[:QUERY] !~ v raise InvalidComponentError, "bad component(expected query component): #{v}" - end + end return true end Index: lib/cgi/core.rb =================================================================== --- lib/cgi/core.rb (revision 19494) +++ lib/cgi/core.rb (revision 19495) @@ -217,14 +217,14 @@ buf << "Set-Cookie: #{cookie}#{EOL}" when Array arr = cookie - arr.each {|cookie| buf << "Set-Cookie: #{cookie}#{EOL}" } + arr.each {|c| buf << "Set-Cookie: #{c}#{EOL}" } when Hash hash = cookie - hash.each {|name, cookie| buf << "Set-Cookie: #{cookie}#{EOL}" } + hash.each {|name, c| buf << "Set-Cookie: #{c}#{EOL}" } end end if @output_cookies - @output_cookies.each {|cookie| buf << "Set-Cookie: #{cookie}#{EOL}" } + @output_cookies.each {|c| buf << "Set-Cookie: #{c}#{EOL}" } end ## other headers options.each do |key, value| @@ -463,9 +463,9 @@ /Content-Disposition:.* filename=(?:"((?:\\.|[^\"])*)"|([^;\s]*))/i.match(head) filename = ($1 or $2 or "") - if /Mac/i.match(env_table['HTTP_USER_AGENT']) and - /Mozilla/i.match(env_table['HTTP_USER_AGENT']) and - (not /MSIE/i.match(env_table['HTTP_USER_AGENT'])) + if /Mac/i =~ env_table['HTTP_USER_AGENT'] and + /Mozilla/i =~ env_table['HTTP_USER_AGENT'] and + /MSIE/i !~ env_table['HTTP_USER_AGENT'] filename = CGI::unescape(filename) end Index: lib/yaml.rb =================================================================== --- lib/yaml.rb (revision 19494) +++ lib/yaml.rb (revision 19495) @@ -213,7 +213,7 @@ # end # end # - def YAML.each_document( io, &block ) + def YAML.each_document( io, &block ) yp = parser.load_documents( io, &block ) end @@ -228,7 +228,7 @@ # end # end # - def YAML.load_documents( io, &doc_proc ) + def YAML.load_documents( io, &doc_proc ) YAML.each_document( io, &doc_proc ) end @@ -243,7 +243,7 @@ # end # end # - def YAML.each_node( io, &doc_proc ) + def YAML.each_node( io, &doc_proc ) yp = generic_parser.load_documents( io, &doc_proc ) end @@ -258,7 +258,7 @@ # end # end # - def YAML.parse_documents( io, &doc_proc ) + def YAML.parse_documents( io, &doc_proc ) YAML.each_node( io, &doc_proc ) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/