* ext/pty/lib/expect.rb: add rdoc. based on a patch from Luiz Angelo

Daros de Luca in [ruby-core:23464].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2010-04-09 15:04:40 +00:00
parent d3e7b990dc
commit bd623a0915
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Fri Apr 9 23:57:35 2010 Yusuke Endoh <mame@tsg.ne.jp>
* ext/pty/lib/expect.rb: add rdoc. based on a patch from Luiz Angelo
Daros de Luca in [ruby-core:23464].
Fri Apr 9 23:54:16 2010 Yusuke Endoh <mame@tsg.ne.jp>
* lib/irb/init.rb, lib/irb/lc/help-message,

View File

@ -1,6 +1,12 @@
$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.
def expect(pat,timeout=9999999)
buf = ''
case pat