lib/expectr.rb in expectr-0.8.0 vs lib/expectr.rb in expectr-0.8.1
- old
+ new
@@ -25,11 +25,11 @@
# In Ruby 1.8, we want to ignore SIGCHLD. This is for two reasons:
# * SIGCHLD will be sent (and cause exceptions) for every Expectr object
# created
# * As John Carter documented in his RExpect library, calls to files which
# do not exist can cause odd and unexpected behavior.
- Signal.trap('CHLD', 'IGNORE')
+ trap 'CHLD', Proc.new { nil }
end
# == Description
# Expectr is an implementation of the Expect library in ruby (see
# http://expect.nist.gov).
@@ -197,10 +197,10 @@
in_thread = Thread.new do
input = ''
while @pid > 0
if select([STDIN], nil, nil, 1)
- @stdin.syswrite STDIN.getc
+ @stdin.syswrite STDIN.getc.chr
end
end
end
in_thread.join