Why doesn't Array#product return Enumerator?

e$B1sF#$G$9!#e(B

Array#product e$B$Oe(B Enumerator
e$B$G$J$/G[Ns$rJV$7$^$9$,!“2?$+M}M3$,e(B
e$B$”$C$F$N$3$H$G$7$g$&$+!#e(B

Array#permutation e$B$de(B combination e$B$N$h$&$Ke(B Enumerator
e$B$rJV$7$?J}$,e(B
e$B<[email protected]$H;W$$$^$9!#$3$l$i$N%a%=%C%I$Oe(B brute force
e$BE*$JC5:w$Ke(B
e$B$h$/;H$$$^$9$,!"e(Bproduct
[email protected]$1C5:wA0$K5pBg$JG[Ns$r3NJ]$7$F$7$^$&$N$Ge(B
e$B$$$d$i$7$$$G$9!#e(B

e$B;EMMJQ99$K$J$C$F$7$^$$$^$9$,!"[email protected]$C$F$_$^$7$?!#$I$&$G$7$g$&$+!#e(B

Index: array.c

— array.c (revision 24823)
+++ array.c (working copy)
@@ -3858,30 +3858,35 @@

  • call-seq:
  • ary.product(other_ary, ...)
    
    • Returns an array of all combinations of elements from all arrays.
    • The length of the returned array is the product of the length
    • of ary and the argument arrays
    • When invoked with a block, yields all combinations of elements
    • from all arrays.
    • [1,2,3].product([4,5])     # => 
      

[[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]]

    • [1,2].product([1,2])       # => [[1,1],[1,2],[2,1],[2,2]]
      
    • [1,2].product([3,4],[5,6]) # => 
      

[[1,3,5],[1,3,6],[1,4,5],[1,4,6],

    •                            # 
      

[2,3,5],[2,3,6],[2,4,5],[2,4,6]]

    • [1,2].product()            # => [[1],[2]]
      
    • [1,2].product([])          # => []
      
    • When invoked without a block, returns an enumerator object instead.
    • [1,2,3].product([4,5]).to_a     # =>
      

[[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]]

    • [1,2].product([1,2]).to_a       # => [[1,1],[1,2],[2,1],[2,2]]
      
    • [1,2].product([3,4],[5,6]).to_a # => 
      

[[1,3,5],[1,3,6],[1,4,5],[1,4,6],

    •                                 # 
      

[2,3,5],[2,3,6],[2,4,5],[2,4,6]]

    • [1,2].product().to_a            # => [[1],[2]]
      
    • [1,2].product([]).to_a          # => []
      
    */

static VALUE
rb_ary_product(int argc, VALUE argv, VALUE ary)
{
int n = argc+1; /
How many arrays we’re operating on */

  • volatile VALUE t0 = tmpbuf(n, sizeof(VALUE));
  • volatile VALUE t1 = tmpbuf(n, sizeof(int));
  • VALUE arrays = (VALUE)RSTRING_PTR(t0); /* The arrays we’re
    computing the product of */
  • int counters = (int)RSTRING_PTR(t1); /* The current position in
    each one */
  • VALUE result; /* The array we’ll be returning */
  • volatile VALUE t0, t1;

  • VALUE *arrays;

  • int *counters;
    long i,j;
    long resultlen = 1;

  • RETURN_ENUMERATOR(ary, argc, argv);

  • t0 = tmpbuf(n, sizeof(VALUE));

  • t1 = tmpbuf(n, sizeof(int));

  • arrays = (VALUE*)RSTRING_PTR(t0); /* The arrays we’re computing
    the product of */

  • counters = (int*)RSTRING_PTR(t1); /* The current position in each
    one */

  • RBASIC(t0)->klass = 0;
    RBASIC(t1)->klass = 0;

@@ -3903,7 +3908,6 @@
}

 /* Otherwise, allocate and fill in an array of results */
  • result = rb_ary_new2(resultlen);
    for (i = 0; i < resultlen; i++) {
    int m;
    /* fill in one subarray */
    @@ -3913,7 +3917,7 @@
    }

/* put it on the result array */

  • rb_ary_push(result, subarray);
  • rb_yield(subarray);

    /*

    • Increment the last counter. If it overflows, reset to 0
      @@ -3930,7 +3934,7 @@
      tmpbuf_discard(t0);
      tmpbuf_discard(t1);
  • return result;
  • return ary;
    }

/*
Index: test/ruby/test_array.rb

— test/ruby/test_array.rb (revision 24823)
+++ test/ruby/test_array.rb (working copy)
@@ -1306,14 +1306,14 @@

def test_product
assert_equal(@cls[[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]],

  •             @cls[1,2,3].product([4,5]))
    
  • assert_equal(@cls[[1,1],[1,2],[2,1],[2,2]],
    @cls[1,2].product([1,2]))
  •             @cls[1,2,3].product([4,5]).to_a)
    
  • assert_equal(@cls[[1,1],[1,2],[2,1],[2,2]],
    @cls[1,2].product([1,2]).to_a)

    assert_equal(@cls[[1,3,5],[1,3,6],[1,4,5],[1,4,6],
    [2,3,5],[2,3,6],[2,4,5],[2,4,6]],

  •             @cls[1,2].product([3,4],[5,6]))
    
  • assert_equal(@cls[[1],[2]], @cls[1,2].product)
  • assert_equal(@cls[], @cls[1,2].product([]))
  •             @cls[1,2].product([3,4],[5,6]).to_a)
    
  • assert_equal(@cls[[1],[2]], @cls[1,2].product.to_a)
  • assert_equal(@cls[], @cls[1,2].product([]).to_a)
    end

def test_permutation

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

In message “Re: [ruby-dev:39277] Why doesn’t Array#product return
Enumerator?”
on Thu, 10 Sep 2009 01:48:38 +0900, Yusuke ENDOH [email protected]
writes:

|Array#product e$B$Oe(B Enumerator e$B$G$J$/G[Ns$rJV$7$^$9$,!“2?$+M}M3$,e(B
|e$B$”$C$F$N$3$H$G$7$g$&$+!#e(B

permutatione$B$de(Bcombinatione$B$O%V%m%C%/$r<u$1$k$N$,4pK\7?$G!"%V%m%Ce(B
e$B%/$,$J$$7A<0$G$OB>$N%a%=%C%I$K$J$i$$e(BEnumeratore$B$rJV$7$F$$$^$9!#e(B
e$B0lJ}!“e(Bproducte$B$Oe(B(e$BG[Ns$H$7$Fe(B)[email protected]$rJV$9$N$,4pK\7?$G!”%V%m%C%/$r<ue(B
e$B$1$k7A<0$O$"$j$^$;$s!#$3$N0c$$$,M}M3$G$9!#e(B

|Array#permutation e$B$de(B combination e$B$N$h$&$Ke(B Enumerator e$B$rJV$7$?J}$,e(B
|e$B<[email protected]$H;W$$$^$9!#$3$l$i$N%a%=%C%I$Oe(B brute force e$BE*$JC5:w$Ke(B
|e$B$h$/;H$$$^$9$,!"e(Bproduct [email protected]$1C5:wA0$K5pBg$JG[Ns$r3NJ]$7$F$7$^$&$N$Ge(B
|e$B$$$d$i$7$$$G$9!#e(B
|
|e$B;EMMJQ99$K$J$C$F$7$^$$$^$9$,!"[email protected]$C$F$_$^$7$?!#$I$&$G$7$g$&$+!#e(B

e$B;d<+?H$O$3$l$i$N%a%=%C%I$r;H$o$J$$$N$G!"$3$l$i$,!V<+A3$+$DJXe(B
e$BMx!W$+$I$&$+H=CG$G$-$^$;$s!#[email protected]!“[email protected]$N0UL#$+$i9M$($k$He(B
[email protected]$o$l$F!”@Q$G$O$J$/e(BEnumeratore$B$rJV$9$N$O$$+$7$$5$$,e(B
e$B$7$^$9!#$^$"!"$=$l$J$i$Pe(Bpermutatione$B$de(Bcombinatione$B$b==J,$K$
$+e(B
[email protected]$o$l$l$P$=$NDL$j$J$s$G$9$,!#e(B

e$B1sF#$G$9!#e(B

2009e$BG/e(B9e$B7ne(B10e$BF|e(B22:39 Yukihiro M.
[email protected]:

e$B0lJ}!“e(Bproducte$B$Oe(B(e$BG[Ns$H$7$Fe(B)[email protected]$rJV$9$N$,4pK\7?$G!”%V%m%C%/$r<ue(B
e$B$1$k7A<0$O$"$j$^$;$s!#$3$N0c$$$,M}M3$G$9!#e(B

e$B$&!"K\Ev$KJ9$-$?$+$C$?$N$O!V$J$s$Ge(B product [email protected]$1e(B permutation
e$B$?$A$H0c$&%$%s%?!<%U%’%$%9$K$J$C$F$$$k$N$+!W$G$9!#e(B

|Array#permutation e$B$de(B combination e$B$N$h$&$Ke(B Enumerator e$B$rJV$7$?J}$,e(B
|e$B<[email protected]$H;W$$$^$9!#$3$l$i$N%a%=%C%I$Oe(B brute force e$BE*$JC5:w$Ke(B
|e$B$h$/;H$$$^$9$,!"e(Bproduct [email protected]$1C5:wA0$K5pBg$JG[Ns$r3NJ]$7$F$7$^$&$N$Ge(B
|e$B$$$d$i$7$$$G$9!#e(B
|
|e$B;EMMJQ99$K$J$C$F$7$^$$$^$9$,!"[email protected]$C$F$_$^$7$?!#$I$&$G$7$g$&$+!#e(B

e$B;d<+?H$O$3$l$i$N%a%=%C%I$r;H$o$J$$$N$G!"$3$l$i$,!V<+A3$+$DJXe(B
e$BMx!W$+$I$&$+H=CG$G$-$^$;$s!#e(B

e$B!V<+A3!W$H$$$&$N$Oe(B permutation e$B$de(B combination
[email protected]$+$i$G$9e(B
(e$B>[email protected]}$,JQ$G$7$?e(B)
e$B!#<[email protected]$&[email protected]$G$9$M!#e(B

e$B$"$H!"[email protected]$re(B each
e$B$7$?$$>l9g$K!VJXMx!W$G$9!#$=$&$$$&>l9g$Oe(B
e$B%Q%:%k$r2r$/>l9g$dAmEv$j%F%9%H$r$9$k>l9g$K$=$3$=$3H/@8$7$^$9!#e(B
e$B$$$-$J$jG[[email protected]$H!"e(Beach e$B$7;O$a$kA0$K5pBg$JG[Ns$,3NJ]e(B
e$B$5$l$F$7$^$$$^$9!#e(Bproduct e$B$,%V%m%C%/$r<u$1<h$C$F$/$l$l$P$3$Ne(B
e$BLdBj$O$J$/$J$j$^$9!#=>Mh$I$*$jG[Ns$,$[$7$$$J$ie(B .to_a
[email protected]$1e(B
e$B$G$G$-$^$9!#e(B

[email protected]!“[email protected]$N0UL#$+$i9M$($k$He(B
[email protected]$o$l$F!”@Q$G$O$J$/e(BEnumeratore$B$rJV$9$N$O$$+$7$$5$$,e(B
e$B$7$^$9!#$^$"!"$=$l$J$i$Pe(Bpermutatione$B$de(Bcombinatione$B$b==J,$K$
$+e(B
[email protected]$o$l$l$P$=$NDL$j$J$s$G$9$,!#e(B

e$B:#[email protected][email protected]!W$H$$$&$b$N$G$O$J$/G[Ns$rJV$7$F$$$k$N$G$9$,!"e(B
e$BG[Ns$O$h$/$F$be(B Enumerator e$B$O%@%a$J$s$G$7$g$&$+!#e(B

e$B1sF#$G$9!#e(B

2009e$BG/e(B9e$B7ne(B11e$BF|e(B7:46 Yukihiro M.
[email protected]:

|e$B:#[email protected][email protected]!W$H$$$&$b$N$G$O$J$/G[Ns$rJV$7$F$$$k$N$G$9$,!"e(B
|e$BG[Ns$O$h$/$F$be(B Enumerator e$B$O%@%a$J$s$G$7$g$&$+!#e(B

e$BG[Ns$HG[[email protected]$N<+A3$J7?$OG[Ns$J$s$8$c$J$$$G$7$g$&$+!#e(B

e$BD>@Q=89g$O=g=xBP$N=89g$N$O$:$J$N$G!"=g=xBP$r;}$D%3%s%F%J$J$ie(B
e$B$J$s$G$b$$$$$+$J$H;W$C$F$$$^$7$?!#e(B
e$B$"$H!“e(BEnumerator e$B$Oe(B LazyArray
e$B$NCJ3,EF3F~$H$$$&G’<1$J$N$G!"e(B
e$B8zN(0J30$NM}M3$GG[Ns$He(B Enumerator [email protected]
$K6hJL$7$h$&$He(B
e$B;W$C$?$3$H$,$”$j$^$;$s$G$7$?!#e(B

(1) producte$B$,%V%m%C%/$r<h$k$h$&$K$9$k!#La$jCM$OG[Ns$N$^$^!#e(B

e$B$G$9!#%V%m%C%/$r<h$k%a%=%C%I$,<h$i$J$$;~$Ke(BEnumeratore$B$G$J$/G[e(B
e$BNs$rJV$9$N$OB>$H0c$&$H;W$o$l$=$&$G$9$,!"$b$H$b$H$N%k!<%k$Oe(B
e$B!V%V%m%C%/$r<h$i$J$$$H%(%i!<$K$J$C$F$$$?%a%=%C%I$Oe(BEnumerator
e$B$rJV$9!W$H$$$&[email protected]$C$?$N$G!">/$J$/$H$b%k!<%k0cH?$G$O$"$j$^e(B
e$B$;$s!#e(B

e$B%V%m%C%/$,M?$($i$l$?;~$KLa$jCM$,e(B self e$B$de(B nil
e$B$K$J$k$N$G$"$l$P!"e(B
e$B$=$l$G$b9=$o$J$$$H;W$$$^$9!#e(B

(3) LazyArraye$B$N$h$&$J$b$N$r:n$C$F!“e(Bproduct(e$B$He(Bcombinatione$B$He(B
permutation)e$B$,%V%m%C%/$,M?$($i$l$J$$;~$K$O!”$=$l$rJV$9$he(B
e$B$&$K$9$k!#e(B

e$B$H$$$&$N$b9M$($i$l$^$9$,!"$h$j$$$2$5$G$9$M!#e(B

Enumerator e$B$O>-Mhe(B LazyArray e$B$KJQ$o$C$F$$$/$H;W$C$F$$$k$N$G!"e(B
e$BBg$2$5$H$O46$8$^$;$s$G$7$?!#$9$0$K$O<BAu$G$-$J$$$H;W$$$^$9$,!#e(B

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

In message “Re: [ruby-dev:39299] Re: Why doesn’t Array#product return
Enumerator?”
on Thu, 10 Sep 2009 23:52:44 +0900, Yusuke ENDOH [email protected]
writes:

|e$B$&!"K\Ev$KJ9$-$?$+$C$?$N$O!V$J$s$Ge(B product [email protected]$1e(B permutation
|e$B$?$A$H0c$&%$%s%?!<%U%’%$%9$K$J$C$F$$$k$N$+!W$G$9!#e(B

e$B$9$G$K=R$Y$?DL$j!"!Ve(Bproducte$B$H$$$&[email protected]$rJV$9$3$H$r4|BT$5e(B
e$B$;$k$,!"$=$NI=8=$H$7$Fe(BEnumeratore$B$OE,@Z$G$J$$$h$&$K;W$($k!W$He(B
e$B$$$&$b$N$G$9!#$^$?!"$=$l$KBP$7$F!Ve(Bcombinatione$B$de([email protected]$Ce(B
[email protected]!W$H$$$&[email protected]$OEvA3$"$j$($k$HG’<1$7$F$$$^$9!#e(B

e$BK\Ev$Oe(Bcombinatione$B$J$I$bG[Ns$rJV$7$?$+$C$?$N$G!":#$N>uBV$,M}e(B
e$BA[$G$J$$$N$OG’$a$^$9!#$3$NJU$r8+Mn$H$7$F$$$?$N$ODK$$<:GT$G$9!#e(B

|e$B$"$H!"[email protected]$re(B each e$B$7$?$$>l9g$K!VJXMx!W$G$9!#$=$&$$$&>l9g$Oe(B
|e$B%Q%:%k$r2r$/>l9g$dAmEv$j%F%9%H$r$9$k>l9g$K$=$3$=$3H/@8$7$^$9!#e(B
|e$B$$$-$J$jG[[email protected]$H!"e(Beach e$B$7;O$a$kA0$K5pBg$JG[Ns$,3NJ]e(B
|e$B$5$l$F$7$^$$$^$9!#e(Bproduct e$B$,%V%m%C%/$r<u$1<h$C$F$/$l$l$P$3$Ne(B
|e$BLdBj$O$J$/$J$j$^$9!#=>Mh$I$*$jG[Ns$,$[$7$$$J$ie(B .to_a [email protected]$1e(B
|e$B$G$G$-$^$9!#e(B

|e$B:#[email protected][email protected]!W$H$$$&$b$N$G$O$J$/G[Ns$rJV$7$F$$$k$N$G$9$,!"e(B
|e$BG[Ns$O$h$/$F$be(B Enumerator e$B$O%@%a$J$s$G$7$g$&$+!#e(B

e$BG[Ns$HG[[email protected]$N<+A3$J7?$OG[Ns$J$s$8$c$J$$$G$7$g$&$+!#e(Bto_ae$B$9e(B
e$B$l$P$h$$$H$O$$C$7$c$$$^$9$,!"35G0E$K0c$&[email protected](B
e$B6KE*$K?d>)$9$k$K$ODq93$,$"$j$^$9!#@Q$G$O$J$/!"MWAG$NAH$_9g$oe(B
e$B$;$NNs$rJV$9$H9M$($l$P$h$$$N$G$7$g$&$,!#$=$l$H$b;d$,M}2r$7$Fe(B
[email protected]$1$G!"G[[email protected]$C$F$=$&$$$&$b$N!)e(B

e$B$G!"Ds0F$9$k$N$Oe(B

(1) producte$B$,%V%m%C%/$r<h$k$h$&$K$9$k!#La$jCM$OG[Ns$N$^$^!#e(B

e$B$G$9!#%V%m%C%/$r<h$k%a%=%C%I$,<h$i$J$$;~$Ke(BEnumeratore$B$G$J$/G[e(B
e$BNs$rJV$9$N$OB>$H0c$&$H;W$o$l$=$&$G$9$,!"$b$H$b$H$N%k!<%k$Oe(B
e$B!V%V%m%C%/$r<h$i$J$$$H%(%i!<$K$J$C$F$$$?%a%=%C%I$Oe(BEnumerator
e$B$rJV$9!W$H$$$&[email protected]$C$?$N$G!">/$J$/$H$b%k!<%k0cH?$G$O$"$j$^e(B
e$B$;$s!#e(B

e$B$D$$$G$Ke(B

(2) combinatione$B$He(Bpermutatione$B$b%V%m%C%/$,$J$1$l$PG[Ns$rJV$9$he(B
e$B$&$K$9$ke(B

e$B$bDs0F$7$?$$$H$3$m$G$9$,!"$3$A$i$OHs8_49$J$s$G!"$9$0$K$H$$$&e(B
e$B$o$1$K$O$$$+$J$$$+$b$7$l$^$;$s!#e(B

e$BJL0F$H$7$F$Oe(B

(3)
LazyArraye$B$N$h$&$J$b$N$r:n$C$F!“e(Bproduct(e$B$He(Bcombinatione$B$He(B
permutation)e$B$,%V%m%C%/$,M?$($i$l$J$$;~$K$O!”$=$l$rJV$9$he(B
e$B$&$K$9$k!#e(B

e$B$H$$$&$N$b9M$($i$l$^$9$,!"$h$j$$$2$5$G$9$M!#e(B

                            e$B$^$D$b$He(B e$B$f$-$R$me(B /:|)

e$B1sF#$G$9!#e(B

2009e$BG/e(B9e$B7ne(B12e$BF|e(B7:51 Yukihiro M.
[email protected]:

e$B$U$`!#e(B

|e$BBg$2$5$H$O46$8$^$;$s$G$7$?!#$9$0$K$O<BAu$G$-$J$$$H;W$$$^$9$,!#e(B

e$B$=$l$Oe(BLazyArraye$B$,$G$-$k$^$Ge(Bproducte$B$NJQ99$OBT$F$k$H$$$&0UL#$Ge(B
e$B$9$+!#e(B

e$B$9$_$^$;$s!"$3$N%a!<%k$KJV?.$7$F$$$J$$$3$H$K:#995$$,$D$-$^$7$?!#e(B

LazyArray e$B$OF3F~$N8+9~$_$,Gv$/$J$C$?$HJ9$$$?$N$G!"$=$l$J$ie(B (1)
e$B$,e(B
e$B$$$$$+$J$H;W$$$^$9!#e(B

[email protected]/$J%?%$%_%s%0$Ge(B Feature #3021 [ruby-core:29045] e$B$Ge(B (1)
e$B$HF1$8e(B
e$BDs0F$,$J$5$l$F$$$ke(B
(e$B$H$$$&$+$=$l$r8+$F$3$N%a!<%k$r;W$$=P$7$?e(B) e$B$N$Ge(B
e$B>5G’$rD:$1$k$H4r$7$$$G$9!#e(B1.9.2
e$B$KF~$k$?$a$K$O:#F|Cf$G$9$,!D!D!#e(B

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

In message “Re: [ruby-dev:39318] Re: Why doesn’t Array#product return
Enumerator?”
on Fri, 11 Sep 2009 21:43:45 +0900, Yusuke ENDOH [email protected]
writes:

|> e$BG[Ns$HG[[email protected]$N<+A3$J7?$OG[Ns$J$s$8$c$J$$$G$7$g$&$+!#e(B
|
|e$BD>@Q=89g$O=g=xBP$N=89g$N$O$:$J$N$G!"=g=xBP$r;}$D%3%s%F%J$J$ie(B
|e$B$J$s$G$b$$$$$+$J$H;W$C$F$$$^$7$?!#e(B

e$B$U$`!#e(B

|e$B$"$H!“e(BEnumerator e$B$Oe(B LazyArray e$B$NCJ3,EF3F~$H$$$&G’<1$J$N$G!"e(B
|e$B8zN(0J30$NM}M3$GG[Ns$He(B Enumerator [email protected]
$K6hJL$7$h$&$He(B
|e$B;W$C$?$3$H$,$”$j$^$;$s$G$7$?!#e(B

e$B$d$O$je(BEnumeratore$B$He(BLazyArraye$B$O0c$&[email protected]$H;W$$$^$9$h!#e(B
Enumeratore$B$O%7!<%1%s%7%c%k$J%"%/%;%9$7$+5v$7$^$;$s$7!"?6$kIqe(B
e$B$$e(B(e$B%a%=%C%Ie(B)e$B$b$+$J$j0c$$$^$9!#e(B

|> (1) producte$B$,%V%m%C%/$r<h$k$h$&$K$9$k!#La$jCM$OG[Ns$N$^$^!#e(B

|e$B%V%m%C%/$,M?$($i$l$?;~$KLa$jCM$,e(B self e$B$de(B nil e$B$K$J$k$N$G$"$l$P!"e(B
|e$B$=$l$G$b9=$o$J$$$H;W$$$^$9!#e(B

|> (3) LazyArraye$B$N$h$&$J$b$N$r:n$C$F!“e(Bproduct(e$B$He(Bcombinatione$B$He(B
|> permutation)e$B$,%V%m%C%/$,M?$($i$l$J$$;~$K$O!”$=$l$rJV$9$he(B
|> e$B$&$K$9$k!#e(B
|>
|> e$B$H$$$&$N$b9M$($i$l$^$9$,!"$h$j$$$2$5$G$9$M!#e(B
|
|Enumerator e$B$O>-Mhe(B LazyArray e$B$KJQ$o$C$F$$$/$H;W$C$F$$$k$N$G!"e(B
|e$BBg$2$5$H$O46$8$^$;$s$G$7$?!#$9$0$K$O<BAu$G$-$J$$$H;W$$$^$9$,!#e(B

e$B$=$l$Oe(BLazyArraye$B$,$G$-$k$^$Ge(Bproducte$B$NJQ99$OBT$F$k$H$$$&0UL#$Ge(B
e$B$9$+!#e(B

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

In message “Re: [ruby-dev:40860] Re: Why doesn’t Array#product return
Enumerator?”
on Wed, 31 Mar 2010 01:43:26 +0900, Yusuke ENDOH [email protected]
writes:

|LazyArray e$B$OF3F~$N8+9~$$,Gv$/$J$C$?$HJ9$$$?$N$G!"$=$l$J$ie(B (1) e$B$,e(B
|e$B$$$$$+$J$H;W$$$^$9!#e(B
|
|[email protected]/$J%?%$%
%s%0$Ge(B Feature #3021 [ruby-core:29045] e$B$Ge(B (1) e$B$HF1$8e(B
|e$BDs0F$,$J$5$l$F$$$ke(B (e$B$H$$$&$+$=$l$r8+$F$3$N%a!<%k$r;W$$=P$7$?e(B) e$B$N$Ge(B
|e$B>5G’$rD:$1$k$H4r$7$$$G$9!#e(B1.9.2 e$B$KF~$k$?$a$K$O:#F|Cf$G$9$,!D!D!#e(B

e$B;d$O;[email protected]$7$^$9!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs