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:
parent
90991d9889
commit
91a3db0afc
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Thu Feb 07 13:44:08 2002 akira yamada <akira@arika.org>
|
||||||
|
|
||||||
|
* uri/common.rb (URI::join): new method.
|
||||||
|
|
||||||
|
* uri/generic.rb (Generic#merge): URI.parse("http://a/")+"b" should
|
||||||
|
return "http://a/b" but it returned "http://a//b".
|
||||||
|
|
||||||
|
* uri/generic.rb (Generic#check_path): corrected error message,
|
||||||
|
@path -> v
|
||||||
|
|
||||||
Thu Feb 7 00:18:43 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Thu Feb 7 00:18:43 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (io_write): flag when buffered write is done.
|
* io.c (io_write): flag when buffered write is done.
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
=end
|
=end
|
||||||
|
|
||||||
module URI
|
module URI
|
||||||
VERSION_CODE = '000904'.freeze
|
VERSION_CODE = '000905'.freeze
|
||||||
VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
|
VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -378,6 +378,19 @@ module URI
|
|||||||
|
|
||||||
=begin
|
=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])
|
--- URI::extract(str[, schemes])
|
||||||
|
|
||||||
=end
|
=end
|
||||||
|
@ -494,7 +494,7 @@ Object
|
|||||||
else
|
else
|
||||||
if v && v != '' && ABS_PATH !~ v && REL_PATH !~ v
|
if v && v != '' && ABS_PATH !~ v && REL_PATH !~ v
|
||||||
raise InvalidComponentError,
|
raise InvalidComponentError,
|
||||||
"bad component(expected relative path component): #{@path}"
|
"bad component(expected relative path component): #{v}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -688,7 +688,7 @@ Object
|
|||||||
end
|
end
|
||||||
|
|
||||||
# RFC2396, Section 5.2, 6), a)
|
# 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), c)
|
||||||
# RFC2396, Section 5.2, 6), d)
|
# RFC2396, Section 5.2, 6), d)
|
||||||
@ -719,7 +719,7 @@ Object
|
|||||||
# valid absolute path
|
# valid absolute path
|
||||||
# end
|
# end
|
||||||
base_path << x
|
base_path << x
|
||||||
base_path += tmp
|
tmp.each {|t| base_path << t}
|
||||||
add_trailer_slash = false
|
add_trailer_slash = false
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user