summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorwakou <wakou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-27 18:12:36 +0000
committerwakou <wakou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-27 18:12:36 +0000
commit9052830d0ef54291ebb8f263e62aa95a589c6483 (patch)
treea5a1fbe9406eb8ce1e093978ddef0582e612dbcf /lib
parent98b2c11d3c9b521783be49a9ebca331f93c5a5c0 (diff)
downloadruby-9052830d0ef54291ebb8f263e62aa95a589c6483.tar.gz
ruby-9052830d0ef54291ebb8f263e62aa95a589c6483.tar.xz
ruby-9052830d0ef54291ebb8f263e62aa95a589c6483.zip
* lib/cgi.rb (CGI#[]): improvement. thanks to Kazuhiro NISHIYAMA
<zn@mbf.nifty.com> git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/cgi.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb
index fbb9a346c..bf7aa85f5 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -943,6 +943,9 @@ convert string charset, and set language to "ja".
def [](key)
value = @params[key][0]
+ def value.to_ary
+ [self.dup]
+ end
def value.[](key)
$stderr.puts <<END
CAUTION! cgi['key'] == cgi.params['key'][0] If want Array, use cgi.params['key']