1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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

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