diff options
author | akira <akira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-24 04:18:16 +0000 |
---|---|---|
committer | akira <akira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-24 04:18:16 +0000 |
commit | 20405e8e8b94cc33204219a8ac62a6b3b4447f14 (patch) | |
tree | d6a7da0a5446f0b5464b5a61f59d1ccca2c5f578 /lib | |
parent | 8ff90a3b4c650424622fc906bf4abbee71819b8e (diff) | |
download | ruby-20405e8e8b94cc33204219a8ac62a6b3b4447f14.tar.gz ruby-20405e8e8b94cc33204219a8ac62a6b3b4447f14.tar.xz ruby-20405e8e8b94cc33204219a8ac62a6b3b4447f14.zip |
* lib/uri/common.rb, lib/uri/generic.rb: fixed typo in documents and
replaced some existent domain name with "example.com".
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/uri/common.rb | 16 | ||||
-rw-r--r-- | lib/uri/generic.rb | 22 |
2 files changed, 19 insertions, 19 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 882ba7ae9..ccf57bd93 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -270,12 +270,12 @@ module URI # # require 'uri' # - # enc_uri = URI.escape("http://foobar.com/?a=\11\15") + # enc_uri = URI.escape("http://example.com/?a=\11\15") # p enc_uri - # # => "http://foobar.com/?a=%09%0D" + # # => "http://example.com/?a=%09%0D" # # p URI.unescape(enc_uri) - # # => "http://foobar.com/?a=\t\r" + # # => "http://example.com/?a=\t\r" # def escape(str, unsafe = UNSAFE) unless unsafe.kind_of?(Regexp) @@ -305,12 +305,12 @@ module URI # # require 'uri' # - # enc_uri = URI.escape("http://foobar.com/?a=\11\15") + # enc_uri = URI.escape("http://example.com/?a=\11\15") # p enc_uri - # # => "http://foobar.com/?a=%09%0D" + # # => "http://example.com/?a=%09%0D" # # p URI.unescape(enc_uri) - # # => "http://foobar.com/?a=\t\r" + # # => "http://example.com/?a=\t\r" # def unescape(str) str.gsub(ESCAPED) do @@ -509,8 +509,8 @@ module URI # # require 'uri' # - # p URI.join("http:/localhost/","main.rbx") - # # => #<URI::HTTP:0x2022ac02 URL:http:/localhost/main.php> + # p URI.join("http://localhost/","main.rbx") + # # => #<URI::HTTP:0x2022ac02 URL:http://localhost/main.rbx> # def self.join(*str) u = self.parse(str[0]) diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb index 325345004..51c2bf17f 100644 --- a/lib/uri/generic.rb +++ b/lib/uri/generic.rb @@ -689,10 +689,10 @@ module URI # # require 'uri' # - # uri = URI.parse("http://my.rubysite.com") + # uri = URI.parse("http://my.example.com") # uri.merge!("/main.rbx?page=1") # p uri - # # => #<URI::HTTP:0x2021f3b0 URL:http://my.rubysite.com/main.rbx?page=1> + # # => #<URI::HTTP:0x2021f3b0 URL:http://my.example.com/main.rbx?page=1> # def merge!(oth) t = merge(oth) @@ -718,9 +718,9 @@ module URI # # require 'uri' # - # uri = URI.parse("http://my.rubysite.com") + # uri = URI.parse("http://my.example.com") # p uri.merge("/main.rbx?page=1") - # # => #<URI::HTTP:0x2021f3b0 URL:http://my.rubysite.com/main.rbx?page=1> + # # => #<URI::HTTP:0x2021f3b0 URL:http://my.example.com/main.rbx?page=1> # def merge(oth) begin @@ -904,8 +904,8 @@ module URI # # require 'uri' # - # uri = URI.parse('http://my.rubysite.com/main.rbx?page=1') - # p uri.route_from('http://my.rubysite.com') + # uri = URI.parse('http://my.example.com/main.rbx?page=1') + # p uri.route_from('http://my.example.com') # #=> #<URI::Generic:0x20218858 URL:/main.rbx?page=1> # def route_from(oth) @@ -944,8 +944,8 @@ module URI # # require 'uri' # - # uri = URI.parse('http://my.rubysite.com') - # p uri.route_to('http://my.rubysite.com/main.rbx?page=1') + # uri = URI.parse('http://my.example.com') + # p uri.route_to('http://my.example.com/main.rbx?page=1') # #=> #<URI::Generic:0x2020c2f6 URL:/main.rbx?page=1> # def route_to(oth) @@ -1085,9 +1085,9 @@ module URI # # require 'uri' # - # uri = URI.parse('http://myuser:mypass@my.rubysite.com/test.rbx') + # uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx') # p uri.select(:userinfo, :host, :path) - # # => ["myuser:mypass", "my.rubysite.com", "/test.rbx"] + # # => ["myuser:mypass", "my.example.com", "/test.rbx"] # def select(*components) components.collect do |c| @@ -1101,7 +1101,7 @@ module URI end def inspect - sprintf("#<%s:0x%x URL:%s>", self.class.to_s, self.object_id, self.to_s) + sprintf("#<%s:%#0x URL:%s>", self.class.to_s, self.object_id, self.to_s) end def coerce(oth) |