summaryrefslogtreecommitdiff
path: root/lib/cgi.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-29 17:47:24 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-29 17:47:24 +0000
commit525336fcc97a0c0fc8dae2e6f9fe63dfc6e645ab (patch)
tree23b84c6d3aa98723fea6577ecedbb3d15a49baba /lib/cgi.rb
parent2e0b6e28ada7713aab10343c2850f32dec4652ac (diff)
* eval.c (proc_invoke): single array value to normal Proc#call
(i.e. not via lambda call), should be treated just like yield. [ruby-dev:21726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi.rb')
-rw-r--r--lib/cgi.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb
index a6003d99a6..43a5aa89f0 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -1152,11 +1152,9 @@ class CGI
end
alias last first
def to_a
- @params
- end
- def to_ary # to be rhs of multiple assignment
- @params
+ @params || [self]
end
+ alias to_ary to_a # to be rhs of multiple assignment
end
# Get the value for the parameter with a given key.