diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-16 15:58:23 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-16 15:58:23 +0000 |
commit | 0ec558603bf0ac08d023122c01c6150090728b6d (patch) | |
tree | 39f42f02c9eed8811ec539147e83a15d360a596f /lib | |
parent | f040ad699eef86fdc7b3ac79c548e3d147cf0658 (diff) | |
download | ruby-0ec558603bf0ac08d023122c01c6150090728b6d.tar.gz ruby-0ec558603bf0ac08d023122c01c6150090728b6d.tar.xz ruby-0ec558603bf0ac08d023122c01c6150090728b6d.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@23196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cgi/core.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/cgi/core.rb b/lib/cgi/core.rb index 69c7f2860..4ca0bcf05 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 |