diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-26 22:22:37 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-26 22:22:37 +0000 |
commit | ca9654114920982b7603e28d6e8d808df77f1795 (patch) | |
tree | 7ab1a8cf2de8781c681571480b228ec843e8dd75 /ext/pty | |
parent | 18e342e80dfe96b865e3b80a27687ccf4b09d781 (diff) | |
download | ruby-ca9654114920982b7603e28d6e8d808df77f1795.tar.gz |
* ext/pathname/lib/pathname.rb: Fix typos and grammar mistakes. Patch
by Luke Gruber. [#5203]
* ext/pty/lib/expect.rb: ditto
* lib/mathn.rb: ditto
* lib/net/http.rb: ditto
* lib/open-uri.rb: ditto
* lib/ostruct.rb: ditto
* lib/tempfile.rb: ditto
* lib/thread.rb: ditto
* lib/weakref.rb: ditto
* sample/webrick/httpproxy.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty')
-rw-r--r-- | ext/pty/lib/expect.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/pty/lib/expect.rb b/ext/pty/lib/expect.rb index 0b238af8be..c15044bd2a 100644 --- a/ext/pty/lib/expect.rb +++ b/ext/pty/lib/expect.rb @@ -1,12 +1,14 @@ $expect_verbose = false class IO - # Reads ios until pattern matches or the timeout is over. It returns - # an array with the read buffer, followed by the matches. If a block is given, - # the result is yielded to the block and returns nil. The optional timeout parameter defines, - # in seconds, the total time to wait for pattern. If it is over of eof is found, it - # returns/yields nil. However, the buffer in a timeout session is kept for the next expect call. - # The default timeout is 9999999 seconds. + # Reads from the IO until pattern +pat+ matches or the +timeout+ is over. + # It returns an array with the read buffer, followed by the matches. + # If a block is given, the result is yielded to the block and returns nil. + # + # The optional timeout parameter defines, in seconds, the total time to wait + # for the pattern. If the timeout expires or eof is found, nil is returned + # or yielded. However, the buffer in a timeout session is kept for the next + # expect call. The default timeout is 9999999 seconds. def expect(pat,timeout=9999999) buf = '' case pat |