summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-22 22:02:44 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-22 22:02:44 +0000
commite47f91a9ea56182c7cc32984d114ec146c19e4d7 (patch)
tree292d58fa73273001d1b0391e5191505ee5575514
parent7eabee4a4079170f2cb727c885cd107f9d51a39c (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@12342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/cgi.rb1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 85219c7633..4d3c8637a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed May 23 06:51:46 2007 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * lib/cgi.rb (CGI#[]): get rid of exceptions being raised.
+ [ruby-dev:30740], Thanks Kentaro KAWAMOTO.
+
Wed May 23 05:49:49 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb, ext/purelib.rb, lib/mkmf.rb, runruby.rb: clear default
diff --git a/lib/cgi.rb b/lib/cgi.rb
index 0c27f1f33a..a442d44930 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