summaryrefslogtreecommitdiff
path: root/lib/cgi
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-23 18:16:08 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-23 18:16:08 +0000
commit563b6544378236252898f7489a336bd25890cfe7 (patch)
treeb80bbf5dc24569ce41091af900231ead3a8de967 /lib/cgi
parentf3ba845deb749e9915bbba7e4b0d2de4ab424490 (diff)
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
Diffstat (limited to 'lib/cgi')
-rw-r--r--lib/cgi/core.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/cgi/core.rb b/lib/cgi/core.rb
index 7af29a9401..163af7fb44 100644
--- a/lib/cgi/core.rb
+++ b/lib/cgi/core.rb
@@ -217,14 +217,14 @@ class CGI
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 @@ class CGI
/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