summaryrefslogtreecommitdiff
path: root/trunk/ext/pty/README.expect
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 15:02:05 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 15:02:05 +0000
commit0dc342de848a642ecce8db697b8fecd83a63e117 (patch)
tree2b7ed4724aff1f86073e4740134bda9c4aac1a39 /trunk/ext/pty/README.expect
parentef70cf7138ab8034b5b806f466e4b484b24f0f88 (diff)
added tag v1_9_0_4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_9_0_4@18845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'trunk/ext/pty/README.expect')
-rw-r--r--trunk/ext/pty/README.expect22
1 files changed, 22 insertions, 0 deletions
diff --git a/trunk/ext/pty/README.expect b/trunk/ext/pty/README.expect
new file mode 100644
index 0000000000..fddbb6fdad
--- /dev/null
+++ b/trunk/ext/pty/README.expect
@@ -0,0 +1,22 @@
+ README for expect
+ by A. Ito, 28 October, 1998
+
+ Expect library adds IO class a method called expect(), which
+does similar act to tcl's expect extension.
+
+The usage of the method is:
+
+ IO#expect(pattern,timeout=9999999)
+
+where `pattern' is an instance of String or Regexp and `timeout'
+is Fixnum, which can be omitted.
+ When the method is called without block, it waits until the
+input which matches the pattern is obtained from the IO or the time
+specified as the timeout passes. When the pattern is obtained from the
+IO, the method returns an array. The first element of the array is the
+entire string obtained from the IO until the pattern matches. The
+following elements indicates the specific pattern which matched to the
+anchor in the regular expression. If the method ends because of
+timeout, it returns nil.
+ When the method is called with block, the array is passed as
+the block parameter.