aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-09-22 13:52:19 -0700
committerXavier Noria <fxn@hashref.com>2012-09-22 13:52:19 -0700
commit40b57116975cafdd9f81a49a7bc757809f4465f8 (patch)
tree28b376888bdd02b290042bdfc8ff5212768425d9 /actionpack/lib
parent19fa8fa3c436ed5b25e7ed0005f128487a7d1f0b (diff)
parente9ba548baf74cc3a5ec65135dac385d81e14f06e (diff)
downloadrails-40b57116975cafdd9f81a49a7bc757809f4465f8.tar.gz
rails-40b57116975cafdd9f81a49a7bc757809f4465f8.tar.bz2
rails-40b57116975cafdd9f81a49a7bc757809f4465f8.zip
Merge pull request #7713 from porras/action-dispatch-upload-delegates-close-to-tempfile
Delegate ActionDispatch::Http::UploadedFile#close to tempfile
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/http/upload.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/http/upload.rb b/actionpack/lib/action_dispatch/http/upload.rb
index ce8c2729e9..d50c8cad17 100644
--- a/actionpack/lib/action_dispatch/http/upload.rb
+++ b/actionpack/lib/action_dispatch/http/upload.rb
@@ -12,13 +12,9 @@ module ActionDispatch
@headers = hash[:head]
end
- def read(*args)
- @tempfile.read(*args)
- end
-
# Delegate these methods to the tempfile.
- [:open, :path, :rewind, :size, :eof?].each do |method|
- class_eval "def #{method}; @tempfile.#{method}; end"
+ [:read, :open, :close, :path, :rewind, :size, :eof?].each do |method|
+ class_eval "def #{method}(*args); @tempfile.#{method}(*args); end"
end
private