Str.lines[1..-1]


#1

e$B@DLZ$G$9!#e(B

e$B<!$N$h$&$J%3!<%I$r=q$$$?$ie(B NoMethodError e$B$K$J$C$Fe(B
e$BHa$7$$;W$$$r$7$^$7$?!#e(B

str.lines[1…-1]

e$B$7$g$&$,$J$/e(B str.lines.to_a[1…-1] e$B$H=q$$$FF($2$^$7$?$,!"e(B
e$B;zLL$,7y$9$.$^$9!#$=$3$G<!$N$h$&$J2r7h0F$r9M$($^$7$?!#e(B

e$B0Fe(B1: self.to_a[*args] e$B$rJV$9$h$&$Je(B Enumerator#[] e$B$re(B
e$BDI2C$9$ke(B
e$B0Fe(B2: String#lines e$B$OG[Ns$rJV$9$3$H$K$7$F!"e(B
Enumerator e$B$rJV$9JL$N%a%=%C%I$rDI2C$9$ke(B

e$B$I$&$G$7$g$&$+!#e(B


#2

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

In message “Re: [ruby-dev:30486] str.lines[1…-1]”
on Mon, 5 Mar 2007 10:01:00 +0900, Minero A. removed_email_address@domain.invalid
writes:

|e$B<!$N$h$&$J%3!<%I$r=q$$$?$ie(B NoMethodError e$B$K$J$C$Fe(B
|e$BHa$7$$;W$$$r$7$^$7$?!#e(B
|
| str.lines[1…-1]
|
|e$B$7$g$&$,$J$/e(B str.lines.to_a[1…-1] e$B$H=q$$$FF($2$^$7$?$,!"e(B
|e$B;zLL$,7y$9$.$^$9!#$=$3$G<!$N$h$&$J2r7h0F$r9M$($^$7$?!#e(B
|
|e$B0Fe(B1: self.to_a[*args] e$B$rJV$9$h$&$Je(B Enumerator#[] e$B$re(B
|e$BDI2C$9$ke(B
|e$B0Fe(B2: String#lines e$B$OG[Ns$rJV$9$3$H$K$7$F!"e(B
| Enumerator e$B$rJV$9JL$N%a%=%C%I$rDI2C$9$ke(B
|
|e$B$I$&$G$7$g$&$+!#e(B

e$B$$$:$l$GBP1~$9$k$+$I$&$+$O$H$b$+$/$J$s$i$+$NBP=h$O$7$?$$$H;We(B
e$B$$$^$9!#0Fe(B2e$B$N>l9g!“L>A0$NDs0F$,$”$j$^$9$+!)e(B


#3

e$B$J$+$@$G$9!#e(B

At Mon, 5 Mar 2007 10:01:00 +0900,
Minero A. wrote in [ruby-dev:30486]:

e$B0Fe(B1: self.to_a[*args] e$B$rJV$9$h$&$Je(B Enumerator#[] e$B$re(B
e$BDI2C$9$ke(B

Arraye$B$G$O$J$/$Fe(BEnumratore$B$rJV$9$N$,$$$$$s$8$c$J$$$+$H;W$$$^$9!#e(B


#4

e$B@DLZ$G$9!#e(B

On 2007/03/06, at 19:22, Yukihiro M. wrote:

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

|e$B0Fe(B1: self.to_a[*args] e$B$rJV$9$h$&$Je(B Enumerator#[] e$B$re(B
|e$BDI2C$9$ke(B
|e$B0Fe(B2: String#lines e$B$OG[Ns$rJV$9$3$H$K$7$F!"e(B
| Enumerator e$B$rJV$9JL$N%a%=%C%I$rDI2C$9$ke(B
|
|e$B$I$&$G$7$g$&$+!#e(B

e$B$$$:$l$GBP1~$9$k$+$I$&$+$O$H$b$+$/$J$s$i$+$NBP=h$O$7$?$$$H;We(B
e$B$$$^$9!#0Fe(B2e$B$N>l9g!“L>A0$NDs0F$,$”$j$^$9$+!)e(B

e$BFC$K9M$($F$O$$$^$;$s$G$7$?!#e(Benum_lines e$B$H$+e(B
lazy_lines e$B$H$+e(B
e$B0BD>$JL>A0$7$+;W$$$D$+$J$$$N$G$9$,!“2?$+$$$$$N$,$”$j$^$9$+$M$(!#e(B

e$B$I$C$+$GJ9$$$?$h$&$JL>A0$@!D!De(B > lazy_lines


#5

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

In message “Re: [ruby-dev:30508] Re: str.lines[1…-1]”
on Fri, 9 Mar 2007 01:03:30 +0900, Nobuyoshi N.
removed_email_address@domain.invalid writes:

|At Mon, 5 Mar 2007 10:01:00 +0900,
|Minero A. wrote in [ruby-dev:30486]:
|> e$B0Fe(B1: self.to_a[*args] e$B$rJV$9$h$&$Je(B Enumerator#[] e$B$re(B
|> e$BDI2C$9$ke(B
|
|Arraye$B$G$O$J$/$Fe(BEnumratore$B$rJV$9$N$,$$$$$s$8$c$J$$$+$H;W$$$^$9!#e(B

Enumeratore$B$Ke(B[]e$B$rDI2C$9$k>l9g!“2a5n$K@8@.$7$?MWAG$r3P$($F$*$/e(B
e$BI,MW$,$”$j$^$9$,!"$=$l$O$=$l$GBgJQ$J$3$H$N$h$&$J!#e(B


#6

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

In message “Re: [ruby-dev:30512] Re: str.lines[1…-1]”
on Fri, 9 Mar 2007 09:19:52 +0900, Nobuyoshi N.
removed_email_address@domain.invalid writes:

|> Enumeratore$B$Ke(B[]e$B$rDI2C$9$k>l9g!“2a5n$K@8@.$7$?MWAG$r3P$($F$*$/e(B
|> e$BI,MW$,$”$j$^$9$,!"$=$l$O$=$l$GBgJQ$J$3$H$N$h$&$J!#e(B
|
|Enumerator#[]e$B$r8F$P$l$?E@$+$iA0J}$N$_!"$H$$$&BP1~$OCfESH>C<$G$9e(B
|e$B$+$M!#e(B

e$B$@$H;W$$$^$9!#L$Mh$G$Oe(BLazyArraye$B$N$h$&$Je(BEnumeratore$B$He(BArraye$B$NN>e(B
e$BJ}$N@-<A$r;}$D$b$N$r:n$C$Fe(Bcollecte$B$J$I$NLa$jCM$K$7$?$$9=A[$Oe(B
e$B$"$j$^$9$N$Ge(B(e$B$9$k$H$b$&$A$g$C$HCY1dI>2A$C$]$$$3$H$,$G$-$k$h$&e(B
e$B$K$J$ke(B)e$B!"$=$&$$$&$N$O$=$3$^$GBT$C$F$b$i$C$F!"H>C<$JBP1~$OF3e(B
e$BF~$7$J$$J}$,$h$5$=$&$G$9!#e(B

e$B!V>-Mh!W$G$O$J$/!V:#$d$k!W$H$$$&A*Br;h$b$"$k$o$1$G$9$,!#e(B


#7

e$B$J$+$@$G$9!#e(B

At Fri, 9 Mar 2007 07:43:55 +0900,
Yukihiro M. wrote in [ruby-dev:30511]:

|At Mon, 5 Mar 2007 10:01:00 +0900,
|Minero A. wrote in [ruby-dev:30486]:
|> e$B0Fe(B1: self.to_a[*args] e$B$rJV$9$h$&$Je(B Enumerator#[] e$B$re(B
|> e$BDI2C$9$ke(B
|
|Arraye$B$G$O$J$/$Fe(BEnumratore$B$rJV$9$N$,$$$$$s$8$c$J$$$+$H;W$$$^$9!#e(B

Enumeratore$B$Ke(B[]e$B$rDI2C$9$k>l9g!“2a5n$K@8@.$7$?MWAG$r3P$($F$*$/e(B
e$BI,MW$,$”$j$^$9$,!"$=$l$O$=$l$GBgJQ$J$3$H$N$h$&$J!#e(B

Enumerator#[]e$B$r8F$P$l$?E@$+$iA0J}$N$_!"$H$$$&BP1~$OCfESH>C<$G$9e(B
e$B$+$M!#e(B