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 | b1020bf03edfb370a01949d754e1e3061eac2b6f (patch) | |
tree | 6a3b4a392a1ea0992b084124af0ce632093e2ab7 /lib/uri | |
parent | f07afe1cb55c1df88eb4ec228e4797d8c90fcd4d (diff) | |
download | bundler-b1020bf03edfb370a01949d754e1e3061eac2b6f.tar.gz |
* lib/uri/common.rb, lib/uri/generic.rb: fixed typo in documents and
replaced some existent domain name with "example.com".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/uri')
-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 d532d9abb6..2263fbddde 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 3253450046..51c2bf17f6 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) |