e$B%A%1%C%He(B #546 e$B$,99?7$5$l$^$7$?!#e(B (by Yui NARUSE)
e$B%+%F%4%je(B coree$B$K%;%C%He(B
e$B8!:w$9$k$HI8=`E:IU%i%$%V%i%j$G$b$R$C$+$+$C$F$$$^$9$,!"e(B
e$B$3$A$i$K$D$$$F$O$9$G$KBP=h:Q$_$G$9!#e(B
e$B$^$!!“$.$c$C$H$J$k%1!<%9$G$b!”%V%m%C%/%Q%i%a!<%?$,e(B String
e$B$+$ie(B MatchData e$B$K$J$k$@$1$J$N$G!"e(B
str.gsub(/foo/){|bar| …} e$B$J$i$P!"e(B
str.gsub(/foo/){|bar| bar=bar.to_s; …} e$B$J$i$P!“e(B
e$B$K$7$F$*$1$P$H$j$”$($:F0$/$h$&$K$J$k$o$1$G$9$,!#e(B
MatchData e$B$Ne(B method_missing
e$B$K:Y9)$7$F!"e(BStringe$B$N%a%=%C%I$r8F$V$H$+$d$k$N$O!&!&!&e(B
e$B$d$a$?$[$&$,$$$$$@$m$&$J$!!#e(B
http://redmine.ruby-lang.org/issues/show/546
e$B4d<<$G$9!#e(B
e$B$&$(!“e(BMatchDatae$B$K$9$k$s$G$9$+e(B?
scane$B$H0lCW$5$;$FM_$7$$$J$!!”$H;W$C$F$k$s$G$9$,!D!D!#e(B
scane$B$be(BMatchDatae$B$K$7$?$i!“E}0l@-$O<h$l$k$@$m$&$1$I!”$b$C$H7c$7$/!"$.$c$C$H$J$k$h$&$J5$$9$k!#e(B
2008/09/10 15:28 Yui NARUSE [email protected]:
e$B4d<<$G$9!#e(B
e$B$3$l$N7hDj!"e(B1.9.1e$B$K$O4V$K9g$$$^$;$s$+e(B?
2008/09/11 0:38 IWAMURO Motonori [email protected]:
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:36524] Re: [Feature #546] String#gsub
e$B$He(B Strnig#scan e$B$N%V%m%C%/%Q%i%a!<%?$N0lCWe(B”
on Thu, 25 Sep 2008 01:01:42 +0900, “IWAMURO Motonori”
[email protected] writes:
|e$B$3$l$N7hDj!"e(B1.9.1e$B$K$O4V$K9g$$$^$;$s$+e(B?
e$B$$$A$*$&!“e(BYuguie$B$5$s$K$O!V8!F$$9$k$+$iBT$C$F!W$HEA$($F$”$j$^e(B
e$B$9!#$?$@!“F0$+$J$/$J$k%W%m%0%i%`$,$I$N$/$i$$$”$k$N$+8+@Q$b$le(B
e$B$J$/$F$M$(!#e(B