summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-23 00:12:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-23 00:12:33 +0000
commit71a31e48480c578a92b6cd9985106674edf92009 (patch)
treeaaa892415958d26635cd85a321a0cebbbd806be1 /test
parent8725997317c23bb5861390ebb9427a7873d74ffd (diff)
downloadruby-71a31e48480c578a92b6cd9985106674edf92009.tar.gz
ruby-71a31e48480c578a92b6cd9985106674edf92009.tar.xz
ruby-71a31e48480c578a92b6cd9985106674edf92009.zip
* test/cgi/test_cgi_multipart.rb (CGIMultipartTest#_prepare):
always must be binary mode. c.f. Bug#2341 git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/cgi/test_cgi_multipart.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/cgi/test_cgi_multipart.rb b/test/cgi/test_cgi_multipart.rb
index 012f51564..717640e4f 100644
--- a/test/cgi/test_cgi_multipart.rb
+++ b/test/cgi/test_cgi_multipart.rb
@@ -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