IO#expect(pattern,timeout=9999999) â ArrayIO#expect(pattern,timeout=9999999) { |result| ... } â nil
Instance Public methods
Reads from the IO until the given
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.
When called without a block, it waits until the input that matches the
given pattern is obtained from the IO or
the time specifi