From 50cea7a5c90eb70539c07ccc63532b4e880e0557 Mon Sep 17 00:00:00 2001 From: mame Date: Thu, 16 Apr 2009 15:58:23 +0000 Subject: * 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 --- lib/cgi/core.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3