* 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:
parent
d3e7b990dc
commit
bd623a0915
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user