mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/cgi/test_cgi_multipart.rb (CGIMultipartTest#_prepare):
always must be binary mode. c.f. Bug#2341 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
833afaa2cc
commit
da861d79b7
3 changed files with 9 additions and 7 deletions
|
|
@ -135,11 +135,8 @@ class CGIMultipartTest < Test::Unit::TestCase
|
|||
ENV['CONTENT_LENGTH'] = input.length.to_s
|
||||
ENV['REQUEST_METHOD'] = 'POST'
|
||||
## set $stdin
|
||||
tmpfile = if RUBY_VERSION >="1.9"
|
||||
Tempfile.new('test_cgi_multipart', :binmode => true)
|
||||
else
|
||||
Tempfile.new('test_cgi_multipart')
|
||||
end
|
||||
tmpfile = Tempfile.new('test_cgi_multipart')
|
||||
tmpfile.binmode
|
||||
tmpfile << input
|
||||
tmpfile.rewind()
|
||||
$stdin = tmpfile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue