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:
parent
641f43de97
commit
9b139fe589
3 changed files with 57 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue