diff options
Diffstat (limited to 'lib/cgi')
-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 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 |