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 | f72380e9314bccac51ae09743a107f8544384d89 (patch) | |
tree | 5cc5fd23b5f59fa18a67987efc5fc8373e8fea2c /test/net/ftp/test_ftp.rb | |
parent | 53cb3d741b2006c46c0a9b9df7f5b2d875d2e262 (diff) | |
download | ruby-f72380e9314bccac51ae09743a107f8544384d89.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/ftp/test_ftp.rb')
-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 |