Skip to content

Commit

Permalink
Fixed NoMethodError in POSIX::Spawn::Child.
Browse files Browse the repository at this point in the history
  • Loading branch information
hotovson committed Mar 4, 2011
1 parent 847e2e9 commit 682e930
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/posix/spawn/child.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def read_and_write(input, stdin, stdout, stderr, timeout=nil, max=nil)
rescue Errno::EPIPE => boom
rescue Errno::EAGAIN, Errno::EINTR
end
if boom || input.size == 0
if boom || input.nil? || input.size == 0
stdin.close
writers.delete(stdin)
end
Expand Down

0 comments on commit 682e930

Please sign in to comment.