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 | 879d41e22c7ef558aba93f93cf16632ba2e03a54 (patch) | |
tree | c09642161c9c6cacb81958f693727a1c59c7d1f4 | |
parent | bcf1e2ac129c7996a88a3129d3aa9a67010cbd84 (diff) | |
download | ruby-879d41e22c7ef558aba93f93cf16632ba2e03a54.tar.gz |
* 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/trunk@15531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/pty/lib/expect.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Mon Feb 18 10:17:42 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/pty/lib/expect.rb (IO#expect): check if peer is closed. + [ruby-Bugs-17940] + Mon Feb 18 00:33:03 2008 Tanaka Akira <akr@fsij.org> * re.c (rb_reg_regsub): don't repeat repl twice with 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 |