summaryrefslogtreecommitdiff
path: root/lib/open-uri.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-07 11:31:21 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-07 11:31:21 +0000
commit6abca35457d4e16b561fed8b7936b06068b33697 (patch)
tree0dbf04277e319c2f335e8ff3101a5c59011f4dbf /lib/open-uri.rb
parentc24349e32d6cd74e4df9103364af62a59095ef6c (diff)
fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/open-uri.rb')
-rw-r--r--lib/open-uri.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/open-uri.rb b/lib/open-uri.rb
index 116644ce07..e448e47af5 100644
--- a/lib/open-uri.rb
+++ b/lib/open-uri.rb
@@ -66,7 +66,7 @@ module Kernel
# If the first argument respond to `open' method,
# the method is called with the rest arguments.
#
- # If the first argument is a string and begins with xxx://,
+ # If the first argument is a string which begins with xxx://,
# it is parsed by URI.parse. If the parsed object respond to `open' method,
# the method is called with the rest arguments.
#
@@ -79,7 +79,7 @@ module Kernel
def open(name, *rest, &block)
if name.respond_to?(:open)
name.open(*rest, &block)
- elsif name.respond_to?("to_str") &&
+ elsif name.respond_to?(:to_str) &&
%r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} =~ name &&
(uri = URI.parse(name)).respond_to?(:open)
uri.open(*rest, &block)
@@ -250,7 +250,7 @@ module OpenURI
end
end
- # returns an Array which consits status code and message.
+ # returns an Array which consists status code and message.
attr_accessor :status
# returns a URI which is base of relative URIs in the data.
@@ -449,14 +449,14 @@ module URI
# But http_proxy and HTTP_PROXY is treated specially under CGI environment.
# It's because HTTP_PROXY may be set by Proxy: header.
# So HTTP_PROXY is not used.
- # http_proxy is not used too if the variable is case insentitive.
+ # http_proxy is not used too if the variable is case insensitive.
# CGI_HTTP_PROXY can be used instead.
def find_proxy
name = self.scheme.downcase + '_proxy'
proxy_uri = nil
if name == 'http_proxy' && ENV.include?('REQUEST_METHOD') # CGI?
# HTTP_PROXY conflicts with *_proxy for proxy settings and
- # HTTP_* for header informatin in CGI.
+ # HTTP_* for header information in CGI.
# So it should be careful to use it.
pairs = ENV.reject {|k, v| /\Ahttp_proxy\z/i !~ k }
case pairs.length
@@ -465,12 +465,12 @@ module URI
when 1
k, v = pairs.shift
if k == 'http_proxy' && ENV[k.upcase] == nil
- # http_proxy is safe to use becase ENV is case sensitive.
+ # http_proxy is safe to use because ENV is case sensitive.
proxy_uri = ENV[name]
else
proxy_uri = nil
end
- else # http_proxy is safe to use becase ENV is case sensitive.
+ else # http_proxy is safe to use because ENV is case sensitive.
proxy_uri = ENV[name]
end
if !proxy_uri