ruby_expect 1.4 → 1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby_expect/expect.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aae7564291f071fcddf3d57a076cd2fa88c26cbb
|
4
|
+
data.tar.gz: 49e142d0d9a17e8c27461938915573cc7ccae623
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe85ffc733d458dfa2d026a4f836acd878edf2188dbf2fb69802fa760d84ba7770066e2ba2181827b2ff9ab2aac6c8da24f89d11e6d9a62120e3f17f5aad0069
|
7
|
+
data.tar.gz: 79bca0c7efff5f225082680cb5a34f935902012770ef0ba8c5afe380fc3834cc8701943191849998245a8b5053ae1b6037fef3b6e75ab1f8abb70e5dec663158
|
data/lib/ruby_expect/expect.rb
CHANGED
@@ -264,7 +264,7 @@ module RubyExpect
|
|
264
264
|
# the spawned process or connected filehandle/socket is closed
|
265
265
|
#
|
266
266
|
def soft_close
|
267
|
-
while (! @read_fh.
|
267
|
+
while (! @read_fh.closed?)
|
268
268
|
read_proc
|
269
269
|
end
|
270
270
|
@read_fh.close unless (@read_fh.closed?)
|
@@ -294,12 +294,16 @@ module RubyExpect
|
|
294
294
|
end
|
295
295
|
end
|
296
296
|
rescue EOFError => e
|
297
|
+
rescue Errno::EIO => e
|
298
|
+
@read_fh.close
|
299
|
+
return false
|
297
300
|
rescue Exception => e
|
298
301
|
unless (e.to_s == 'stream closed')
|
299
302
|
STDERR.puts "Exception in read_loop:"
|
300
303
|
STDERR.puts "#{e}"
|
301
304
|
STDERR.puts "\t#{e.backtrace.join("\n\t")}"
|
302
305
|
end
|
306
|
+
@read_fh.close
|
303
307
|
return false
|
304
308
|
end
|
305
309
|
return true
|