summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-22 21:58:09 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-22 21:58:09 +0000
commit2faba093569c034989b27f2380e67311670d225f (patch)
tree215a7f15cb322152cc99e132506a38c98558e5e2 /lib
parent46fa180ea0bc6fd8b6e5b3b5566a966519f63759 (diff)
* lib/cgi.rb (CGI#[]): get rid of exceptions being raised.
[ruby-dev:30740], Thanks Kentaro KAWAMOTO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/cgi.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb
index 0c27f1f..a442d44 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -1163,6 +1163,7 @@ class CGI
# retrieved; use #params() to get the array of values.
def [](key)
params = @params[key]
+ return '' unless params
value = params[0]
if @multipart
if value