mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
call binmode on the tempfile for Ruby 1.8 compatibility
This commit is contained in:
parent
1b9e19cd22
commit
f42c96331a
1 changed files with 2 additions and 1 deletions
|
@ -16,7 +16,8 @@ class File
|
|||
require 'tempfile' unless defined?(Tempfile)
|
||||
require 'fileutils' unless defined?(FileUtils)
|
||||
|
||||
temp_file = Tempfile.new(basename(file_name), temp_dir, :binmode => true)
|
||||
temp_file = Tempfile.new(basename(file_name), temp_dir)
|
||||
temp_file.binmode
|
||||
yield temp_file
|
||||
temp_file.close
|
||||
|
||||
|
|
Loading…
Reference in a new issue