Skip to content

Commit

Permalink
Merge pull request #13745 from nextgearcapital/master
Browse files Browse the repository at this point in the history
set encoding for pipe to binary mode
  • Loading branch information
rafaelfranca committed Jan 19, 2014
2 parents 935d235 + 0e9144d commit b1b21f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions activerecord/test/cases/base_test.rb
Expand Up @@ -1380,6 +1380,8 @@ def test_marshal_between_processes
})

rd, wr = IO.pipe
rd.binmode
wr.binmode

ActiveRecord::Base.connection_handler.clear_all_connections!

Expand Down
2 changes: 2 additions & 0 deletions activerecord/test/cases/connection_management_test.rb
Expand Up @@ -31,6 +31,8 @@ def test_connection_pool_per_pid
object_id = ActiveRecord::Base.connection.object_id

rd, wr = IO.pipe
rd.binmode
wr.binmode

pid = fork {
rd.close
Expand Down
2 changes: 2 additions & 0 deletions activesupport/lib/active_support/testing/isolation.rb
Expand Up @@ -37,6 +37,8 @@ def run
module Forking
def run_in_isolation(&blk)
read, write = IO.pipe
read.binmode
write.binmode

pid = fork do
read.close
Expand Down

0 comments on commit b1b21f9

Please sign in to comment.