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

set encoding to binmode for pipe

This commit is contained in:
Anna Carey 2014-01-17 16:49:10 -05:00
parent 486db21f91
commit 0e9144dcec
3 changed files with 6 additions and 0 deletions

View file

@ -1380,6 +1380,8 @@ class BasicsTest < ActiveRecord::TestCase
}) })
rd, wr = IO.pipe rd, wr = IO.pipe
rd.binmode
wr.binmode
ActiveRecord::Base.connection_handler.clear_all_connections! ActiveRecord::Base.connection_handler.clear_all_connections!

View file

@ -31,6 +31,8 @@ module ActiveRecord
object_id = ActiveRecord::Base.connection.object_id object_id = ActiveRecord::Base.connection.object_id
rd, wr = IO.pipe rd, wr = IO.pipe
rd.binmode
wr.binmode
pid = fork { pid = fork {
rd.close rd.close

View file

@ -37,6 +37,8 @@ module ActiveSupport
module Forking module Forking
def run_in_isolation(&blk) def run_in_isolation(&blk)
read, write = IO.pipe read, write = IO.pipe
read.binmode
write.binmode
pid = fork do pid = fork do
read.close read.close