[Bug #2368] URI.regexp $B$K%^%C%A$9$kJ8;zNs$,(B URI.parse $B$G$-$J$$$3$H$,$"$k(B

e$B%A%1%C%He(B #2368 e$B$,99?7$5$l$^$7$?!#e(B (by Kouhei Y.)

e$B3N$+$Ke(B “http://” e$B$OIT@5$Je(B URI
e$B$G$7$?$N$GNc$H$7$FITE,@Z$G$7$?!#e(B

e$B;d$O!Ve(BURI.regexp e$B$K%^%C%A$9$kJ8;zNs$N=89g$He(B URI.parse
e$B$G$-$kJ8;zNs$N=89g$OEy$7$$$N$@$m$&!W$H;W$C$F$$$?$?$ae(B
e$BDs<($7$?$h$&$J$U$k$^$$$K$H$^$I$C$?$N$G$9$,!"N><T$O35G0$,0[$J$k$N$G$7$g$&$+!)e(B
(e$BNc$($P!"e(BURI.parse e$B$O8DJL$N%9%-!<%`$N@)Ls$r9MN8$9$k$J$Ie(B)

e$B0lHLO@$H$7$F!“e(Bhier-part e$B$,6u$G$”$k$h$&$Je(B URI
e$B$O!"%9%-!<%`$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
e$B$=$N$h$&$J$b$N$K$Oe(B URI.parse e$B$OBP1~$7$F$$$J$$$N$G$7$g$&$+!)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 -ruri -e ‘URI.parse “hoge:”’
/home/ani/local/ruby-trunk/lib/ruby/1.9.1/uri/common.rb:126:in split': bad URI(absolute but no path): http:// (URI::InvalidURIError) from /home/ani/local/ruby-trunk/lib/ruby/1.9.1/uri/common.rb:174:in parse’
from
/home/ani/local/ruby-trunk/lib/ruby/1.9.1/uri/common.rb:628:in parse' from -e:1:in


http://redmine.ruby-lang.org/issues/show/2368