ruby-changes:15382
From: mame <ko1@a...>
Date: Sat, 10 Apr 2010 00:04:56 +0900 (JST)
Subject: [ruby-changes:15382] Ruby:r27274 (trunk): * ext/pty/lib/expect.rb: add rdoc. based on a patch from Luiz Angelo
mame 2010-04-10 00:04:40 +0900 (Sat, 10 Apr 2010) New Revision: 27274 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27274 Log: * ext/pty/lib/expect.rb: add rdoc. based on a patch from Luiz Angelo Daros de Luca in [ruby-core:23464]. Modified files: trunk/ChangeLog trunk/ext/pty/lib/expect.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 27273) +++ ChangeLog (revision 27274) @@ -1,3 +1,8 @@ +Fri Apr 9 23:57:35 2010 Yusuke Endoh <mame@t...> + + * 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@t...> * lib/irb/init.rb, lib/irb/lc/help-message, Index: ext/pty/lib/expect.rb =================================================================== --- ext/pty/lib/expect.rb (revision 27273) +++ ext/pty/lib/expect.rb (revision 27274) @@ -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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/