summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/cgi/core.rb8
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b386de37a6..8f4b87658c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Apr 17 00:53:47 2009 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/cgi/core.rb (read_multipart): When path is not defined,
+ define local_path as a method always returning nil instead of
+ aliasing. This is because StringIO#path no longer exists.
+
Fri Apr 17 00:45:09 2009 Yusuke Endoh <mame@tsg.ne.jp>
* dir.c (bracket): fix escape handling for range character in bracket
diff --git a/lib/cgi/core.rb b/lib/cgi/core.rb
index 69c7f28603..4ca0bcf050 100644
--- a/lib/cgi/core.rb
+++ b/lib/cgi/core.rb
@@ -440,7 +440,13 @@ class CGI
## create body (StringIO or Tempfile)
body = create_body(bufsize < content_length)
class << body
- alias local_path path
+ if method_defined?(:path)
+ alias local_path path
+ else
+ def local_path
+ nil
+ end
+ end
attr_reader :original_filename, :content_type
end
## find head and boundary