* 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
This commit is contained in:
akira 2005-06-24 04:18:16 +00:00
parent f07afe1cb5
commit b1020bf03e
3 changed files with 24 additions and 19 deletions

View File

@ -1,3 +1,8 @@
Fri Jun 24 13:17:45 2005 akira yamada <akira@ruby-lang.org>
* lib/uri/common.rb, lib/uri/generic.rb: fixed typo in documents and
replaced some existent domain name with "example.com".
Fri Jun 24 12:23:19 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb: fix typo on Tk.grid_propagate.

View File

@ -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])

View File

@ -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)