aboutsummaryrefslogtreecommitdiffstats
path: root/test/cgi/test_cgi_multipart.rb
diff options
context:
space:
mode:
authorxibbar <xibbar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-08 15:38:48 +0000
committerxibbar <xibbar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-08 15:38:48 +0000
commit9b139fe5892388653b1c213c633e031c778bd875 (patch)
treeed7a1858a1a7c6c0330096cf8555cb615c5d1e22 /test/cgi/test_cgi_multipart.rb
parent641f43de973d51a7d463b067833d4a71706d6c5c (diff)
downloadruby-9b139fe5892388653b1c213c633e031c778bd875.tar.gz
fix test for 1.8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/cgi/test_cgi_multipart.rb')
-rwxr-xr-xtest/cgi/test_cgi_multipart.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/cgi/test_cgi_multipart.rb b/test/cgi/test_cgi_multipart.rb
index 34f077e9c5..47a41f6488 100755
--- a/test/cgi/test_cgi_multipart.rb
+++ b/test/cgi/test_cgi_multipart.rb
@@ -135,7 +135,11 @@ class CGIMultipartTest < Test::Unit::TestCase
ENV['CONTENT_LENGTH'] = input.length.to_s
ENV['REQUEST_METHOD'] = 'POST'
## set $stdin
- tmpfile = Tempfile.new(self.name, :binmode => true)
+ tmpfile = if RUBY_VERSION >="1.9"
+ Tempfile.new(self.name, :binmode => true)
+ else
+ Tempfile.new(self.name)
+ end
tmpfile << input
tmpfile.rewind()
$stdin = tmpfile