Skip to content

Commit

Permalink
* lib/cgi/core.rb (read_multipart): When path is not defined,
Browse files Browse the repository at this point in the history
  define local_path as a method always returning nil instead of
  aliasing.  This is because StringIO#path no longer exists.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
mame committed Apr 16, 2009
1 parent 5e1cb6c commit 50cea7a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Fri Apr 17 00:53:47 2009 Yusuke Endoh <[email protected]>

* 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 <[email protected]>

* dir.c (bracket): fix escape handling for range character in bracket
Expand Down
8 changes: 7 additions & 1 deletion lib/cgi/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,13 @@ def read_multipart(boundary, content_length)
## 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
Expand Down

0 comments on commit 50cea7a

Please sign in to comment.