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

uri-0.9.5

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akira 2002-02-07 04:51:11 +00:00
parent 90991d9889
commit 91a3db0afc
4 changed files with 27 additions and 4 deletions

View file

@ -378,6 +378,19 @@ module URI
=begin
--- URI::join(str[, str, ...])
=end
def self.join(*str)
u = self.parse(str[0])
str[1 .. -1].each do |x|
u = u.merge(x)
end
u
end
=begin
--- URI::extract(str[, schemes])
=end

View file

@ -494,7 +494,7 @@ Object
else
if v && v != '' && ABS_PATH !~ v && REL_PATH !~ v
raise InvalidComponentError,
"bad component(expected relative path component): #{@path}"
"bad component(expected relative path component): #{v}"
end
end
@ -688,7 +688,7 @@ Object
end
# RFC2396, Section 5.2, 6), a)
base_path.pop if !base_path.last.empty?
base_path.pop unless base_path.size == 1
# RFC2396, Section 5.2, 6), c)
# RFC2396, Section 5.2, 6), d)
@ -719,7 +719,7 @@ Object
# valid absolute path
# end
base_path << x
base_path += tmp
tmp.each {|t| base_path << t}
add_trailer_slash = false
break
end