aboutsummaryrefslogtreecommitdiffstats
path: root/test/cgi
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
commitda861d79b701ed24aa3a4e2f303fd00096359341 (patch)
treeaaa892415958d26635cd85a321a0cebbbd806be1 /test/cgi
parent833afaa2cc9c08b5a7ef314575301d4a9abd23a9 (diff)
downloadruby-da861d79b701ed24aa3a4e2f303fd00096359341.tar.gz
* 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
Diffstat (limited to 'test/cgi')
-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 012f515647..717640e4f0 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