diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-18 01:17:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-18 01:17:44 +0000 |
commit | 8b4b606a8619f2bb39b01c5df1425d0f5c8c073a (patch) | |
tree | bd4105871d8ddf31eb10965be3f37bb48c9a1cd4 /ext | |
parent | c786b2e6ae95b644270bd7755b3caeb6a25491a4 (diff) |
* ext/pty/lib/expect.rb (IO#expect): check if peer is closed.
[ruby-Bugs-17940]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/pty/lib/expect.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pty/lib/expect.rb b/ext/pty/lib/expect.rb index aa9ab895d3..08191b05b9 100644 --- a/ext/pty/lib/expect.rb +++ b/ext/pty/lib/expect.rb @@ -10,7 +10,7 @@ class IO e_pat = pat end while true - if IO.select([self],nil,nil,timeout).nil? then + if !IO.select([self],nil,nil,timeout) or eof? then result = nil break end |