aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--lib/cgi/core.rb12
-rw-r--r--lib/uri/generic.rb2
-rw-r--r--lib/uri/mailto.rb2
-rw-r--r--lib/yaml.rb8
5 files changed, 19 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c9eca458f..fe8eefa844 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* lib/csv/csv.rb: Improved the idea of whitespace and word characters used
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
diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb
index 8f5ab6375d..f569a22f49 100644
--- a/lib/uri/generic.rb
+++ b/lib/uri/generic.rb
@@ -516,7 +516,7 @@ module URI
if v && v != '' && @parser.regexp[:QUERY] !~ v
raise InvalidComponentError,
"bad component(expected query component): #{v}"
- end
+ end
return true
end
diff --git a/lib/uri/mailto.rb b/lib/uri/mailto.rb
index c66c95fcd0..38f972e1fb 100644
--- a/lib/uri/mailto.rb
+++ b/lib/uri/mailto.rb
@@ -135,7 +135,7 @@ module URI
@headers = []
if MAILTO_REGEXP =~ @opaque
- if arg[-1]
+ if arg[-1]
self.to = $1
self.headers = $2
else
diff --git a/lib/yaml.rb b/lib/yaml.rb
index a8da42a321..12853401c1 100644
--- a/lib/yaml.rb
+++ b/lib/yaml.rb
@@ -213,7 +213,7 @@ module YAML
# 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 @@ module YAML
# 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 @@ module YAML
# 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 @@ module YAML
# end
# end
#
- def YAML.parse_documents( io, &doc_proc )
+ def YAML.parse_documents( io, &doc_proc )
YAML.each_node( io, &doc_proc )
end