1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2009-04-16 15:58:23 +00:00
parent 5e1cb6cbc6
commit 50cea7a5c9
2 changed files with 13 additions and 1 deletions

View file

@ -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> Fri Apr 17 00:45:09 2009 Yusuke Endoh <mame@tsg.ne.jp>
* dir.c (bracket): fix escape handling for range character in bracket * dir.c (bracket): fix escape handling for range character in bracket

View file

@ -440,7 +440,13 @@ class CGI
## create body (StringIO or Tempfile) ## create body (StringIO or Tempfile)
body = create_body(bufsize < content_length) body = create_body(bufsize < content_length)
class << body 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 attr_reader :original_filename, :content_type
end end
## find head and boundary ## find head and boundary