diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-27 07:34:18 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-27 07:34:18 +0000 |
commit | 3f682c2c8ac3a1438082e4f95467e16247f105fa (patch) | |
tree | 5cc5fd23b5f59fa18a67987efc5fc8373e8fea2c /test/net | |
parent | 6df21cb46945250439a82f515b2971a1b6ae8f21 (diff) | |
download | ruby-3f682c2c8ac3a1438082e4f95467e16247f105fa.tar.gz |
Add binmode for Tempfile to prevent EOF (0x1A)
http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20151023T062322Z.log.html.gz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/net')
-rw-r--r-- | test/net/ftp/test_ftp.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb index b4114e4820..a8d34c62de 100644 --- a/test/net/ftp/test_ftp.rb +++ b/test/net/ftp/test_ftp.rb @@ -796,6 +796,7 @@ class FTPTest < Test::Unit::TestCase assert_match(/\APASS /, commands.shift) assert_equal("TYPE I\r\n", commands.shift) Tempfile.create("foo", external_encoding: "ASCII-8BIT") do |f| + f.binmode buf = String.new res = ftp.getbinaryfile("foo", f.path) { |s| buf << s |