Backporting URI to ruby_1_8


#1

e$B!!e(Blib/uri e$B$re(B trunk e$B$+$ie(B ruby_1_8
e$B$K%^!<%8$7$^$9!#e(B

e$B!!$^$:!"e(B userinfo e$B$K4X$9$k%P%0=$@5$He(BFTPe$B%9%-!<%`$Ne(B path
e$B$K4X$9$ke(B
e$B=$@5$K0[O@$O$J$$$H;W$$$^$9!#e(B

e$B!!e(BURI.escape() e$B$He(B URI.unescape()
e$B$NBhFs0z?t$KJ8;zNs$rEO$7$?>l9g$Ne(B
e$B5sF0$NJQ99$G$9$,!"Hs8_49$O>7$-$^$9$,0J2<$NM}M3$G<h$j9~$`$Y$-$He(B
e$B9M$($^$7$?!#e(B

  • Regexp.new(Regexp.quote(unsafe), false, “N”) e$B$H$J$C$F$$$k$,!“e(B
    e$B$3$l$G$O0lJ8;z$7$+EO$;$J$$$N$GJ8;z=89g$r;XDj$G$-$:!”;vee(B
    e$BLr$KN)$?$J$$!#$D$^$j!"<BAu$^$?$O;EMM$N%P%0$G$"$k!#e(B
    cf. [ruby-dev:27692]

  • rdoc ##e$B$OBhFs0z?t$Oe(B Regexp
    e$B$H=q$$$F$"$j!"J8;zNs$r<u$1IU$1$ke(B
    e$B$3$H$OL@J82=$5$l$?;EMM$G$O$J$$!#e(B

e$B!!%U%j!<%:A0$KF~$l$k$D$b$j$G$9$N$G!"$b$7LdBj$,$"$l$P;XE&$N$[$Ie(B
e$B$*4j$$$7$^$9!#e(B


/
/__ __ Akinori.org / MUSHA.org
/ ) ) ) ) / FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp

“Different eyes see different things,
Different hearts beat on different strings –
But there are times for you and me when all such things agree”


#2

e$B@>;3OB9-$G$9!#e(B

On Wed, 14 Feb 2007 22:06:05 +0900
removed_email_address@domain.invalid(“Akinori MUSHA”) said:

e$B!!e(Blib/uri e$B$re(B trunk e$B$+$ie(B ruby_1_8 e$B$K%^!<%8$7$^$9!#e(B

e$B!!$^$:!"e(B userinfo e$B$K4X$9$k%P%0=$@5$He(BFTPe$B%9%-!<%`$Ne(B path e$B$K4X$9$ke(B
e$B=$@5$K0[O@$O$J$$$H;W$$$^$9!#e(B

userinfo e$B$K4X$9$k%P%0=$@5$H$$$&$N$Oe(B[ruby-core:10290]e$B$Ne(B
e$B6u$N%f!<%6L>$N>l9g$K%Q%9%o!<%I$rL5;k$9$k$h$&$K$9$k$He(B
e$B$$$&;v$G$7$g$&$+e(B?

http://www.sic.med.tohoku.ac.jp/~mladmin/w3m-dev/200001.month/281.html
e$B$K$"$k$h$&$K6u$N%f!<%6L>$,;H$o$l$k$3$H$b$"$k$N$G!“e(B
e$B:#$N5sF0$NJ}$,NI$$$H;W$&$N$G$9$,!”$I$&$G$7$g$&$+e(B?


#3

At Thu, 15 Feb 2007 15:08:28 +0900,
Kazuhiro NISHIYAMA wrote:

userinfo e$B$K4X$9$k%P%0=$@5$H$$$&$N$Oe(B[ruby-core:10290]e$B$Ne(B
e$B6u$N%f!<%6L>$N>l9g$K%Q%9%o!<%I$rL5;k$9$k$h$&$K$9$k$He(B
e$B$$$&;v$G$7$g$&$+e(B?

e$B!!$"!"%Q%C%A$N<q;]$r4*0c$$$7$F$$$^$7$?!#e(B

e$B!!e(Bruby_1_8 e$B$G$O$$$C$?$sLa$7$^$9!#e(B

http://www.sic.med.tohoku.ac.jp/~mladmin/w3m-dev/200001.month/281.html
e$B$K$"$k$h$&$K6u$N%f!<%6L>$,;H$o$l$k$3$H$b$"$k$N$G!“e(B
e$B:#$N5sF0$NJ}$,NI$$$H;W$&$N$G$9$,!”$I$&$G$7$g$&$+e(B?

e$B!!$o$6$o$6JRJ}$@$16u$K$7$F$$$k$N$@$+$i$=$N$^$^$G$$$$5$$,$7$^$9$M!#e(B


/
/__ __ Akinori.org / MUSHA.org
/ ) ) ) ) / FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp

“Different eyes see different things,
Different hearts beat on different strings –
But there are times for you and me when all such things agree”


#4

At Thu, 15 Feb 2007 16:02:00 +0900,
I wrote:

At Thu, 15 Feb 2007 15:08:28 +0900,
Kazuhiro NISHIYAMA wrote:

userinfo e$B$K4X$9$k%P%0=$@5$H$$$&$N$Oe(B[ruby-core:10290]e$B$Ne(B
e$B6u$N%f!<%6L>$N>l9g$K%Q%9%o!<%I$rL5;k$9$k$h$&$K$9$k$He(B
e$B$$$&;v$G$7$g$&$+e(B?

e$B!!$"!"%Q%C%A$N<q;]$r4*0c$$$7$F$$$^$7$?!#e(B

e$B!!8@$$Lu$9$k$H!"e(B ChangeLog
e$B$@$1FI$s$G%P%0=$@5$H?.$8$F$7$^$$$^$7$?!#e(B

e$B!!e(Bruby_1_8 e$B$G$O$$$C$?$sLa$7$^$9!#e(B

http://www.sic.med.tohoku.ac.jp/~mladmin/w3m-dev/200001.month/281.html
e$B$K$"$k$h$&$K6u$N%f!<%6L>$,;H$o$l$k$3$H$b$"$k$N$G!“e(B
e$B:#$N5sF0$NJ}$,NI$$$H;W$&$N$G$9$,!”$I$&$G$7$g$&$+e(B?

e$B!!$o$6$o$6JRJ}$@$16u$K$7$F$$$k$N$@$+$i$=$N$^$^$G$$$$5$$,$7$^$9$M!#e(B

e$B!!e(BURI.parse() e$B$H$NBP>N@-$r9M$($l$P$3$&$9$Y$-!#e(B

def userinfo
  if @user.nil?
    nil
  elsif @password.nil?
    @user
  else
    @user + ':' + @password
  end
end


/
/__ __ Akinori.org / MUSHA.org
/ ) ) ) ) / FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp

“Different eyes see different things,
Different hearts beat on different strings –
But there are times for you and me when all such things agree”


#5

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:30352] Re: backporting URI to ruby_1_8”
on Thu, 15 Feb 2007 16:02:00 +0900, “Akinori MUSHA”
removed_email_address@domain.invalid writes:

|> userinfo e$B$K4X$9$k%P%0=$@5$H$$$&$N$Oe(B[ruby-core:10290]e$B$Ne(B
|> e$B6u$N%f!<%6L>$N>l9g$K%Q%9%o!<%I$rL5;k$9$k$h$&$K$9$k$He(B
|> e$B$$$&;v$G$7$g$&$+e(B?
|
|e$B!!$"!"%Q%C%A$N<q;]$r4*0c$$$7$F$$$^$7$?!#e(B
|e$B!!e(Bruby_1_8 e$B$G$O$$$C$?$sLa$7$^$9!#e(B

e$B$"$N%Q%C%A$K$O!V%Q%9%o!<%I$Ke(Bnile$B$r@_Dj$9$k$HL5;k$9$k!W$H$$$&e(B
e$BLdBj$KBP$9$k=$@5$,4^$^$l$F$$$^$9$N$G!"$=$A$i$O0UL#$,$"$k$H;We(B
e$B$$$^$9!#e(B


#6

At Thu, 15 Feb 2007 16:23:48 +0900,
matz wrote:

|e$B!!e(Bruby_1_8 e$B$G$O$$$C$?$sLa$7$^$9!#e(B

e$B$"$N%Q%C%A$K$O!V%Q%9%o!<%I$Ke(Bnile$B$r@_Dj$9$k$HL5;k$9$k!W$H$$$&e(B
e$BLdBj$KBP$9$k=$@5$,4^$^$l$F$$$^$9$N$G!"$=$A$i$O0UL#$,$"$k$H;We(B
e$B$$$^$9!#e(B

e$B!!$O$$!#e(Bset_password() e$B$N=$@5$H!"e(B userinfo() e$B$Ne(B +
e$B$G$3$1$kLdBj$Ne(B
e$B=$@5$O;D$7$^$9!#e(B


/
/__ __ Akinori.org / MUSHA.org
/ ) ) ) ) / FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp

“Different eyes see different things,
Different hearts beat on different strings –
But there are times for you and me when all such things agree”


#7

At Wed, 14 Feb 2007 22:06:05 +0900,
I wrote:

e$B!!$^$:!"e(B userinfo e$B$K4X$9$k%P%0=$@5$He(BFTPe$B%9%-!<%`$Ne(B path e$B$K4X$9$ke(B
e$B=$@5$K0[O@$O$J$$$H;W$$$^$9!#e(B

e$B!!$H=q$$$F$7$^$$$^$7$?$,!"e(BFTPe$B%9%-!<%`$Ne(B path
e$B$N=$@5$O!"7k2LE*$Ke(B
e$BHs8_49@-$r>7$/$N$G5DO@$,I,MW$G$7$?!#e(B

e$B!!=$@5$N0M5r$Oe(B RFC 1738 e$B$G$9!#e(B"ftp://example.net/foo/bar"
e$B$Ne(B
path e$B$Oe(B “/foo/bar” e$B$G$J$/e(B “foo/bar” e$B$G$"$j!“e(B
example.net e$B>e$Ne(B
“/foo/bar” e$B$Oe(B “ftp://example.net/%2Ffoo/bar” e$B$G$”$k$H!#e(B

e$B!!$?$@!"e(B uri.path = ‘/foo/bar’ e$B$7$F$b@dBP%Q%9$K$J$i$:!“e(B
uri.path = ‘foo/bar’ e$B$,%(%i!<$K$J$k5sF0$O$h$/$o$+$j$^$;$s!#e(B
e$BFbIt$GJ];}$7$F$$$ke(B @path e$B$H%”%/%;%5e(B path
e$B$NBP1~$,OD$s$G$*$j!"e(B
uri.path = uri.path e$B$GNc30H/@8$H$$$&$N$O$I$&$+$H;W$$$^$9!#e(B

e$B!!$3$N$"$?$j!"$^$@$d$j$+$1$J$N$G$7$g$&$+!#e(B

e$B!!$R$H$^$:e(B ruby_1_8, ruby_1_8_6 e$B$G$OLa$7$^$9!#e(B


/
/__ __ Akinori.org / MUSHA.org
/ ) ) ) ) / FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp

“Different eyes see different things,
Different hearts beat on different strings –
But there are times for you and me when all such things agree”