1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fix test for 1.8

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
xibbar 2008-11-08 15:38:48 +00:00
parent 641f43de97
commit 9b139fe589
3 changed files with 57 additions and 10 deletions

View file

@ -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