Bug #2373: URI.parse e$B$Oe(B hier-part e$B$,6u$G$"$ke(B URI
e$B$r%Q!<%9$G$-$J$$e(B
http://redmine.ruby-lang.org/issues/show/2373
e$B5/I<<Te(B: Kouhei Y.
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
e$B%+%F%4%je(B: lib
ruby -v: ruby 1.9.2dev (2009-11-16 trunk 25792) [i686-linux]
RFC 3986 e$B$G$O!“e(Bhier-part e$B$,6u$G$”$k$h$&$Je(B URI e$B$Oe(B
scheme e$B$K$h$C$F$O5vMF$5$l$F$$$ke(B(RFC
3986e$B$G$O@)8B$5$l$F$$$J$$e(B)e$B$H;W$&$N$G$9$,e(B
hier-part e$B$,6u$G$"$ke(B URI e$B$re(B URI.parse e$B$7$h$&$H$9$k$He(B
scheme e$B$K$h$i$:$Ke(B URI::InvalidURIError e$B$K$J$j$^$9!#e(B
http://www.ietf.org/rfc/rfc3986 [Appendix A]
URI = scheme “:” hier-part [ “?” query ] [ “#” fragment ]
hier-part = "//" authority path-abempty
/ path-absolute
/ path-rootless
/ path-empty
path-empty = 0<pchar>
% ~/local/ruby-trunk/bin/ruby -v -ruri -e ‘URI.parse(“hoge:”)’
ruby 1.9.2dev (2009-11-16 trunk 25792) [i686-linux]
/home/yanagi/local/ruby-trunk/lib/ruby/1.9.1/uri/common.rb:126:in
split': bad URI(absolute but no path): hoge: (URI::InvalidURIError) from /home/yanagi/local/ruby-trunk/lib/ruby/1.9.1/uri/common.rb:174:in
parse’
from
/home/yanagi/local/ruby-trunk/lib/ruby/1.9.1/uri/common.rb:628:in
parse' from -e:1:in
’