summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-26 22:22:37 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-26 22:22:37 +0000
commitca9654114920982b7603e28d6e8d808df77f1795 (patch)
tree7ab1a8cf2de8781c681571480b228ec843e8dd75 /ext
parent18e342e80dfe96b865e3b80a27687ccf4b09d781 (diff)
* ext/pathname/lib/pathname.rb: Fix typos and grammar mistakes. Patch
by Luke Gruber. [#5203] * ext/pty/lib/expect.rb: ditto * lib/mathn.rb: ditto * lib/net/http.rb: ditto * lib/open-uri.rb: ditto * lib/ostruct.rb: ditto * lib/tempfile.rb: ditto * lib/thread.rb: ditto * lib/weakref.rb: ditto * sample/webrick/httpproxy.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/pathname/lib/pathname.rb4
-rw-r--r--ext/pty/lib/expect.rb14
2 files changed, 10 insertions, 8 deletions
diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb
index 224c869..1d2b37c 100644
--- a/ext/pathname/lib/pathname.rb
+++ b/ext/pathname/lib/pathname.rb
@@ -386,7 +386,7 @@ class Pathname
# pn.children(false)
# # -> [ Pathname:English.rb, Pathname:Env.rb, Pathname:abbrev.rb, ... ]
#
- # Note that the result never contain the entries <tt>.</tt> and <tt>..</tt> in
+ # Note that the results never contain the entries <tt>.</tt> and <tt>..</tt> in
# the directory because they are not children.
#
# This method has existed since 1.8.1.
@@ -490,7 +490,7 @@ class Pathname # * Find *
# manner. It yields a Pathname for each file under "this" directory.
#
# Since it is implemented by <tt>find.rb</tt>, <tt>Find.prune</tt> can be used
- # to control the traverse.
+ # to control the traversal.
#
# If +self+ is <tt>.</tt>, yielded pathnames begin with a filename in the
# current directory, not <tt>./</tt>.
diff --git a/ext/pty/lib/expect.rb b/ext/pty/lib/expect.rb
index 0b238af..c15044b 100644
--- a/ext/pty/lib/expect.rb
+++ b/ext/pty/lib/expect.rb
@@ -1,12 +1,14 @@
$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.
+ # Reads from the IO until pattern +pat+ 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 the pattern. If the timeout expires or eof is found, nil is returned
+ # or yielded. 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