Skip to content

Commit

Permalink
Add binmode for Tempfile to prevent EOF (0x1A)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nurse committed Oct 27, 2015
1 parent 6df21cb commit 3f682c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/net/ftp/test_ftp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ def test_getbinaryfile_with_filename_and_block
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
Expand Down

0 comments on commit 3f682c2

Please sign in to comment.