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 | bd0cef8be7ba6f73251ff7ff741ecbccd3465ea6 (patch) | |
tree | c09642161c9c6cacb81958f693727a1c59c7d1f4 /ext/pty | |
parent | a5ba4f80663844e0505d37c88d34e0de2e3ab375 (diff) | |
download | ruby-bd0cef8be7ba6f73251ff7ff741ecbccd3465ea6.tar.gz ruby-bd0cef8be7ba6f73251ff7ff741ecbccd3465ea6.tar.xz ruby-bd0cef8be7ba6f73251ff7ff741ecbccd3465ea6.zip |
* ext/pty/lib/expect.rb (IO#expect): check if peer is closed.
[ruby-Bugs-17940]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty')
-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 aa9ab895d..08191b05b 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 |