From d339fed3ad9b6002712a3da09f2a7cdc604b694b Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 23 Sep 2010 12:22:43 +0000 Subject: Add document about URI.join. [ruby-core:32462] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/uri/common.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 1240e6749c..3f92423b1a 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -643,9 +643,22 @@ module URI # # require 'uri' # - # p URI.join("http://localhost/","main.rbx") + # p URI.join("http://example.com/","main.rbx") # # => # # + # p URI.join('http://example.com', 'foo') + # # => # + # + # p URI.join('http://example.com', '/foo', '/bar') + # # => # + # + # p URI.join('http://example.com', '/foo', 'bar') + # # => # + # + # p URI.join('http://example.com', '/foo/', 'bar') + # # => # + # + # def self.join(*str) DEFAULT_PARSER.join(*str) end -- cgit v1.2.3