https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2010-03-18T14:18:56Z
Ruby Issue Tracking System
Ruby master - Feature #2981: Array#repeated_(permutation|combination)
https://bugs.ruby-lang.org/issues/2981?journal_id=9065
2010-03-18T14:18:56Z
naruse (Yui NARUSE)
naruse@airemix.jp
<ul></ul><p>=begin<br>
Show use case.<br>
=end</p>
Ruby master - Feature #2981: Array#repeated_(permutation|combination)
https://bugs.ruby-lang.org/issues/2981?journal_id=9067
2010-03-18T14:57:41Z
shyouhei (Shyouhei Urabe)
shyouhei@ruby-lang.org
<ul></ul><p>=begin<br>
A bit more: use cases are shown in Japanese ML (and I think they're OK), so please just translate them for non-Japanese speakers.<br>
=end</p>
Ruby master - Feature #2981: Array#repeated_(permutation|combination)
https://bugs.ruby-lang.org/issues/2981?journal_id=9069
2010-03-18T15:32:46Z
metanest (Makoto Kishimoto)
<ul></ul><p>=begin<br>
Sorry, the patch of <a href="/issues/2981">[ruby-core:28724]</a> has bug.</p>
<p>This is fixed version.</p>
<a name="Index-arrayc"></a>
<h1 >Index: array.c<a href="#Index-arrayc" class="wiki-anchor">¶</a></h1>
<p>--- array.c (revision 26970)<br>
+++ array.c (working copy)<br>
@@ -4047,7 +4047,187 @@<br>
}</p>
<p>/*</p>
<ul>
<li>
<ul>
<li>Recursively compute repeated permutations of r elements of the set</li>
</ul>
</li>
<li>
<ul>
<li>[0..n-1].</li>
</ul>
</li>
<li>
<ul>
<li>When we have a complete repeated permutation of array indexes, copy the</li>
</ul>
</li>
<li>
<ul>
<li>values at those indexes into a new array and yield that array.</li>
</ul>
</li>
<li>
<ul>
<li>
</ul>
</li>
<li>
<ul>
<li>n: the size of the set</li>
</ul>
</li>
<li>
<ul>
<li>r: the number of elements in each permutation</li>
</ul>
</li>
<li>
<ul>
<li>p: the array (of size r) that we're filling in</li>
</ul>
</li>
<li>
<ul>
<li>index: what index we're filling in now</li>
</ul>
</li>
<li>
<ul>
<li>values: the Ruby array that holds the actual values to permute</li>
</ul>
</li>
<li>*/<br>
+static void<br>
+rpermute0(long n, long r, long *p, long index, VALUE values)<br>
+{</li>
<li>long i, j;</li>
<li>for (i = 0; i < n; i++) {</li>
<li>p[index] = i;</li>
<li>if (index < r-1) { /* if not done yet */</li>
<li>
<pre><code> rpermute0(n, r, p, index+1, values); /* recurse */
</code></pre>
</li>
<li>}</li>
<li>else {</li>
<li>
<pre><code> /* We have a complete permutation of array indexes */
</code></pre>
</li>
<li>
<pre><code> /* Build a ruby array of the corresponding values */
</code></pre>
</li>
<li>
<pre><code> /* And yield it to the associated block */
</code></pre>
</li>
<li>
<pre><code> VALUE result = rb_ary_new2(r);
</code></pre>
</li>
<li>
<pre><code> VALUE *result_array = RARRAY_PTR(result);
</code></pre>
</li>
<li>
<pre><code> const VALUE *values_array = RARRAY_PTR(values);
</code></pre>
</li>
<li>
<li>
<pre><code> for (j = 0; j < r; j++) result_array[j] = values_array[p[j]];
</code></pre>
</li>
<li>
<pre><code> ARY_SET_LEN(result, r);
</code></pre>
</li>
<li>
<pre><code> rb_yield(result);
</code></pre>
</li>
<li>
<pre><code> if (RBASIC(values)->klass) {
</code></pre>
</li>
<li>
<pre><code> rb_raise(rb_eRuntimeError, "repeated permute reentered");
</code></pre>
</li>
<li>
<pre><code> }
</code></pre>
</li>
<li>}</li>
<li>}<br>
+}</li>
<li>
</ul>
<p>+/*</p>
<ul>
<li>call-seq:</li>
</ul>
<ul>
<li>
<ul>
<li>
<pre><code>ary.repeated_permutation(n) { |p| block } -> array
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>ary.repeated_permutation(n) -> enumerator
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
</ul>
</li>
<li>
<ul>
<li>When invoked with a block, yield all repeated permutations of length</li>
</ul>
</li>
<li>
<ul>
<li>
<i>n</i> of the elements of <i>ary</i>, then return the array itself.</li>
</ul>
</li>
<li>
<ul>
<li>The implementation makes no guarantees about the order in which</li>
</ul>
</li>
<li>
<ul>
<li>the repeated permutations are yielded.</li>
</ul>
</li>
<li>
<ul>
<li>
</ul>
</li>
<li>
<ul>
<li>When invoked without a block, return an enumerator object instead.</li>
</ul>
</li>
<li>
<ul>
<li>
</ul>
</li>
<li>
<ul>
<li>Examples:</li>
</ul>
</li>
<li>
<ul>
<li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>a = [1, 2]
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>a.repeated_permutation(1).to_a #=> [[1], [2]]
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code> # [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>a.repeated_permutation(0).to_a #=> [[]] # one permutation of length 0
</code></pre>
</li>
</ul>
</li>
<li>*/</li>
<li>
</ul>
<p>+static VALUE<br>
+rb_ary_repeated_permutation(VALUE ary, VALUE num)<br>
+{</p>
<ul>
<li>long r, n, i;</li>
<li>
<li>n = RARRAY_LEN(ary); /* Array length */</li>
<li>RETURN_ENUMERATOR(ary, 1, &num); /* Return enumerator if no block */</li>
<li>r = NUM2LONG(num); /* Permutation size from argument */</li>
<li>
<li>if (r < 0) {</li>
<li>/* no permutations: yield nothing */</li>
<li>}</li>
<li>else if (r == 0) { /* exactly one permutation: the zero-length array */</li>
<li>rb_yield(rb_ary_new2(0));</li>
<li>}</li>
<li>else if (r == 1) { /* this is a special, easy case */</li>
<li>for (i = 0; i < RARRAY_LEN(ary); i++) {</li>
<li>
<pre><code> rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i]));
</code></pre>
</li>
<li>}</li>
<li>}</li>
<li>else { /* this is the general case */</li>
<li>volatile VALUE t0 = tmpbuf(r, sizeof(long));</li>
<li>long <em>p = (long</em>)RSTRING_PTR(t0);</li>
<li>VALUE ary0 = ary_make_substitution(ary); /* private defensive copy of ary */</li>
<li>RBASIC(ary0)->klass = 0;</li>
<li>
<li>rpermute0(n, r, p, 0, ary0); /* compute and yield repeated permutations */</li>
<li>tmpbuf_discard(t0);</li>
<li>RBASIC(ary0)->klass = rb_cArray;</li>
<li>}</li>
<li>return ary;<br>
+}</li>
<li>
</ul>
<p>+static void<br>
+rcombinate0(long n, long r, long *p, long index, long rest, VALUE values)<br>
+{</p>
<ul>
<li>long j;</li>
<li>if (rest > 0) {</li>
<li>for (; index < n; ++index) {</li>
<li>
<pre><code> p[r-rest] = index;
</code></pre>
</li>
<li>
<pre><code> rcombinate0(n, r, p, index, rest-1, values);
</code></pre>
</li>
<li>}</li>
<li>}</li>
<li>else {</li>
<li>VALUE result = rb_ary_new2(r);</li>
<li>VALUE *result_array = RARRAY_PTR(result);</li>
<li>const VALUE *values_array = RARRAY_PTR(values);</li>
<li>
<li>for (j = 0; j < r; ++j) result_array[j] = values_array[p[j]];</li>
<li>ARY_SET_LEN(result, r);</li>
<li>rb_yield(result);</li>
<li>if (RBASIC(values)->klass) {</li>
<li>
<pre><code> rb_raise(rb_eRuntimeError, "repeated combination reentered");
</code></pre>
</li>
<li>}</li>
<li>}<br>
+}</li>
<li>
</ul>
<p>+/*</p>
<ul>
<li>
<ul>
<li>call-seq:</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>ary.repeated_combination(n) { |c| block } -> ary
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>ary.repeated_combination(n) -> enumerator
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
</ul>
</li>
<li>
<ul>
<li>When invoked with a block, yields all repeated combinations of</li>
</ul>
</li>
<li>
<ul>
<li>length <i>n</i> of elements from <i>ary</i> and then returns</li>
</ul>
</li>
<li>
<ul>
<li>
<i>ary</i> itself.</li>
</ul>
</li>
<li>
<ul>
<li>The implementation makes no guarantees about the order in which</li>
</ul>
</li>
<li>
<ul>
<li>the repeated combinations are yielded.</li>
</ul>
</li>
<li>
<ul>
<li>
</ul>
</li>
<li>
<ul>
<li>When invoked without a block, returns an enumerator object instead.</li>
</ul>
</li>
<li>
<ul>
<li>
</ul>
</li>
<li>
<ul>
<li>Examples:</li>
</ul>
</li>
<li>
<ul>
<li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>a = [1, 2, 3]
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>a.repeated_combination(1).to_a #=> [[1], [2], [3]]
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>a.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>a.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code> # [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]]
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>a.repeated_combination(4).to_a #=> [[1,1,1,1],[1,1,1,2],[1,1,1,3],[1,1,2,2],[1,1,2,3],
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code> # [1,1,3,3],[1,2,2,2],[1,2,2,3],[1,2,3,3],[1,3,3,3],
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code> # [2,2,2,2],[2,2,2,3],[2,2,3,3],[2,3,3,3],[3,3,3,3]]
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
<pre><code>a.repeated_combination(0).to_a #=> [[]] # one combination of length 0
</code></pre>
</li>
</ul>
</li>
<li>
<ul>
<li>
</ul>
</li>
<li>*/</li>
<li>
</ul>
<p>+static VALUE<br>
+rb_ary_repeated_combination(VALUE ary, VALUE num)<br>
+{</p>
<ul>
<li>long n, i, len;</li>
<li>
<li>n = NUM2LONG(num); /* Combination size from argument */</li>
<li>RETURN_ENUMERATOR(ary, 1, &num); /* Return enumerator if no block */</li>
<li>len = RARRAY_LEN(ary);</li>
<li>if (n < 0) {</li>
<li>/* yield nothing */</li>
<li>}</li>
<li>else if (n == 0) {</li>
<li>rb_yield(rb_ary_new2(0));</li>
<li>}</li>
<li>else if (n == 1) {</li>
<li>for (i = 0; i < len; i++) {</li>
<li>
<pre><code> rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i]));
</code></pre>
</li>
<li>}</li>
<li>}</li>
<li>else if (len == 0) {</li>
<li>/* yield nothing */</li>
<li>}</li>
<li>else {</li>
<li>volatile VALUE t0 = tmpbuf(n, sizeof(long));</li>
<li>long <em>p = (long</em>)RSTRING_PTR(t0);</li>
<li>VALUE ary0 = ary_make_substitution(ary); /* private defensive copy of ary */</li>
<li>RBASIC(ary0)->klass = 0;</li>
<li>
<li>rcombinate0(len, n, p, 0, n, ary0); /* compute and yield repeated combinations */</li>
<li>tmpbuf_discard(t0);</li>
<li>RBASIC(ary0)->klass = rb_cArray;</li>
<li>}</li>
<li>return ary;<br>
+}</li>
<li>
</ul>
<p>+/*</p>
<ul>
<li>
<ul>
<li>call-seq:</li>
<li>
<pre><code>ary.product(other_ary, ...)
</code></pre>
</li>
<li>
<li>Returns an array of all combinations of elements from all arrays.<br>
@@ -4332,6 +4512,8 @@<br>
rb_define_method(rb_cArray, "cycle", rb_ary_cycle, -1);<br>
rb_define_method(rb_cArray, "permutation", rb_ary_permutation, -1);<br>
rb_define_method(rb_cArray, "combination", rb_ary_combination, 1);</li>
</ul>
</li>
<li>
<p>rb_define_method(rb_cArray, "repeated_permutation", rb_ary_repeated_permutation, 1);</p>
</li>
<li>
<p>rb_define_method(rb_cArray, "repeated_combination", rb_ary_repeated_combination, 1);<br>
rb_define_method(rb_cArray, "product", rb_ary_product, -1);</p>
<p>rb_define_method(rb_cArray, "take", rb_ary_take, 1);<br>
Index: test/ruby/test_array.rb<br>
===================================================================<br>
--- test/ruby/test_array.rb (revision 26970)<br>
+++ test/ruby/test_array.rb (working copy)<br>
@@ -797,6 +797,40 @@<br>
assert_match(/reentered/, e.message)<br>
end</p>
</li>
<li>
<p>def test_repeated_permutation_with_callcc</p>
</li>
<li>
<p>respond_to?(:callcc, true) or require 'continuation'</p>
</li>
<li>
<p>n = 1000</p>
</li>
<li>
<p>cont = nil</p>
</li>
<li>
<p>ary = [1,2,3]</p>
</li>
<li>
<p>begin</p>
</li>
<li>
<pre><code> ary.repeated_permutation(2) {
</code></pre>
</li>
<li>
<pre><code> callcc {|k| cont = k} unless cont
</code></pre>
</li>
<li>
<pre><code> }
</code></pre>
</li>
<li>
<p>rescue => e</p>
</li>
<li>
<p>end</p>
</li>
<li>
<p>n -= 1</p>
</li>
<li>
<p>cont.call if 0 < n</p>
</li>
<li>
<p>assert_instance_of(RuntimeError, e)</p>
</li>
<li>
<p>assert_match(/reentered/, e.message)</p>
</li>
<li>
<p>end</p>
</li>
<li>
<li>
<p>def test_repeated_combination_with_callcc</p>
</li>
<li>
<p>respond_to?(:callcc, true) or require 'continuation'</p>
</li>
<li>
<p>n = 1000</p>
</li>
<li>
<p>cont = nil</p>
</li>
<li>
<p>ary = [1,2,3]</p>
</li>
<li>
<p>begin</p>
</li>
<li>
<pre><code> ary.repeated_combination(2) {
</code></pre>
</li>
<li>
<pre><code> callcc {|k| cont = k} unless cont
</code></pre>
</li>
<li>
<pre><code> }
</code></pre>
</li>
<li>
<p>rescue => e</p>
</li>
<li>
<p>end</p>
</li>
<li>
<p>n -= 1</p>
</li>
<li>
<p>cont.call if 0 < n</p>
</li>
<li>
<p>assert_instance_of(RuntimeError, e)</p>
</li>
<li>
<p>assert_match(/reentered/, e.message)</p>
</li>
<li>
<p>end</p>
</li>
<li>
<p>def test_hash<br>
a1 = @cls[ 'cat', 'dog' ]<br>
a2 = @cls[ 'cat', 'dog' ]<br>
@@ -1403,6 +1437,54 @@<br>
assert_equal(@cls[1, 2, 3, 4].permutation.to_a, b)<br>
end</p>
</li>
<li>
<p>def test_repeated_permutation</p>
</li>
<li>
<p>a = @cls[1,2]</p>
</li>
<li>
<p>assert_equal(@cls[[]], a.repeated_permutation(0).to_a)</p>
</li>
<li>
<p>assert_equal(@cls[[1],[2]], a.repeated_permutation(1).to_a.sort)</p>
</li>
<li>
<p>assert_equal(@cls[[1,1],[1,2],[2,1],[2,2]],</p>
</li>
<li>
<pre><code> a.repeated_permutation(2).to_a.sort)
</code></pre>
</li>
<li>
<p>assert_equal(@cls[[1,1,1],[1,1,2],[1,2,1],[1,2,2],</p>
</li>
<li>
<pre><code> [2,1,1],[2,1,2],[2,2,1],[2,2,2]],
</code></pre>
</li>
<li>
<pre><code> a.repeated_permutation(3).to_a.sort)
</code></pre>
</li>
<li>
<p>assert_equal(@cls[], a.repeated_permutation(-1).to_a)</p>
</li>
<li>
<p>assert_equal("abcde".each_char.to_a.repeated_permutation(5).sort,</p>
</li>
<li>
<pre><code> "edcba".each_char.to_a.repeated_permutation(5).sort)
</code></pre>
</li>
<li>
<p>assert_equal(@cls[].repeated_permutation(0).to_a, @cls[[]])</p>
</li>
<li>
<p>assert_equal(@cls[].repeated_permutation(1).to_a, @cls[])</p>
</li>
<li>
<li>
<p>a = @cls[1, 2, 3, 4]</p>
</li>
<li>
<p>b = @cls[]</p>
</li>
<li>
<p>a.repeated_permutation(4) {|x| b << x; a.replace(@cls[9, 8, 7, 6]) }</p>
</li>
<li>
<p>assert_equal(@cls[9, 8, 7, 6], a)</p>
</li>
<li>
<p>assert_equal(@cls[1, 2, 3, 4].repeated_permutation(4).to_a, b)</p>
</li>
<li>
<p>end</p>
</li>
<li>
<li>
<p>def test_repeated_combination</p>
</li>
<li>
<p>a = @cls[1,2,3]</p>
</li>
<li>
<p>assert_equal(@cls[[]], a.repeated_combination(0).to_a)</p>
</li>
<li>
<p>assert_equal(@cls[[1],[2],[3]], a.repeated_combination(1).to_a.sort)</p>
</li>
<li>
<p>assert_equal(@cls[[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]],</p>
</li>
<li>
<pre><code> a.repeated_combination(2).to_a.sort)
</code></pre>
</li>
<li>
<p>assert_equal(@cls[[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],</p>
</li>
<li>
<pre><code> [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]],
</code></pre>
</li>
<li>
<pre><code> a.repeated_combination(3).to_a.sort)
</code></pre>
</li>
<li>
<p>assert_equal(@cls[[1,1,1,1],[1,1,1,2],[1,1,1,3],[1,1,2,2],[1,1,2,3],</p>
</li>
<li>
<pre><code> [1,1,3,3],[1,2,2,2],[1,2,2,3],[1,2,3,3],[1,3,3,3],
</code></pre>
</li>
<li>
<pre><code> [2,2,2,2],[2,2,2,3],[2,2,3,3],[2,3,3,3],[3,3,3,3]],
</code></pre>
</li>
<li>
<pre><code> a.repeated_combination(4).to_a.sort)
</code></pre>
</li>
<li>
<p>assert_equal(@cls[], a.repeated_combination(-1).to_a)</p>
</li>
<li>
<p>assert_equal("abcde".each_char.to_a.repeated_combination(5).map{|a|a.sort}.sort,</p>
</li>
<li>
<pre><code> "edcba".each_char.to_a.repeated_combination(5).map{|a|a.sort}.sort)
</code></pre>
</li>
<li>
<p>assert_equal(@cls[].repeated_combination(0).to_a, @cls[[]])</p>
</li>
<li>
<p>assert_equal(@cls[].repeated_combination(1).to_a, @cls[])</p>
</li>
<li>
<li>
<p>a = @cls[1, 2, 3, 4]</p>
</li>
<li>
<p>b = @cls[]</p>
</li>
<li>
<p>a.repeated_combination(4) {|x| b << x; a.replace(@cls[9, 8, 7, 6]) }</p>
</li>
<li>
<p>assert_equal(@cls[9, 8, 7, 6], a)</p>
</li>
<li>
<p>assert_equal(@cls[1, 2, 3, 4].repeated_combination(4).to_a, b)</p>
</li>
<li>
<p>end</p>
</li>
<li>
<p>def test_take<br>
assert_equal([1,2,3], [1,2,3,4,5,0].take(3))<br>
assert_raise(ArgumentError, '<a href="https://blade.ruby-lang.org/ruby-dev/34123">[ruby-dev:34123]</a>') { [1,2].take(-1) }</p>
</li>
</ul>
<p>=end</p>
Ruby master - Feature #2981: Array#repeated_(permutation|combination)
https://bugs.ruby-lang.org/issues/2981?journal_id=9070
2010-03-18T15:40:40Z
metanest (Makoto Kishimoto)
<ul></ul><p>=begin<br>
An example of number puzzle.</p>
<p>['+', '-', '*', '/', ''].repeated_permutation(8).each{|a, b, c, d, e, f, g, h|<br>
s = "1#{a}2#{b}3#{c}4#{d}5#{e}6#{f}7#{g}8#{h}9"<br>
n = eval s<br>
if n == 100 then<br>
p s<br>
end<br>
}</p>
<p>=end</p>
Ruby master - Feature #2981: Array#repeated_(permutation|combination)
https://bugs.ruby-lang.org/issues/2981?journal_id=9071
2010-03-18T16:24:07Z
metanest (Makoto Kishimoto)
<ul></ul><p>=begin<br>
(from <a href="https://blade.ruby-lang.org/ruby-dev/40601">[ruby-dev:40601]</a> )</p>
<p>Try to login with too short passwords.</p>
<p>("a".."z").to_a.repeated_permutation(5).find {|s| login(s.join) }</p>
<p>====</p>
<p>Check ruby parser with doubtful strings.</p>
<p>%w(( ) $ ` ' | & =).repeated_permutation(5) do |s|<br>
begin; eval(p(s.join)); rescue Exception; end<br>
end</p>
<p>=end</p>
Ruby master - Feature #2981: Array#repeated_(permutation|combination)
https://bugs.ruby-lang.org/issues/2981?journal_id=9185
2010-03-22T00:02:01Z
mame (Yusuke Endoh)
mame@ruby-lang.org
<ul></ul><p>=begin<br>
Hi matz,</p>
<p>2010/3/18 KISHIMOTO, Makoto <a href="mailto:ksmakoto@dd.iij4u.or.jp" class="email">ksmakoto@dd.iij4u.or.jp</a>:</p>
<blockquote>
<p>New methods Array#repeated_(permutation|combination).</p>
<p>Like Array#(permutation|combination), these methods make<br>
repeated permutation or combination.</p>
</blockquote>
<p>You have already approved this feature at <a href="https://blade.ruby-lang.org/ruby-dev/40610">[ruby-dev:40610]</a>, and<br>
you said you would apply the patch.</p>
<p>Could you, or may I commit the patch?</p>
<p>--<br>
Yusuke ENDOH <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a></p>
<p>=end</p>
Ruby master - Feature #2981: Array#repeated_(permutation|combination)
https://bugs.ruby-lang.org/issues/2981?journal_id=9244
2010-03-24T09:44:46Z
naruse (Yui NARUSE)
naruse@airemix.jp
<ul><li><strong>Category</strong> set to <i>core</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>matz (Yukihiro Matsumoto)</i></li><li><strong>Priority</strong> changed from <i>3</i> to <i>Normal</i></li></ul><p>=begin</p>
<p>=end</p>
Ruby master - Feature #2981: Array#repeated_(permutation|combination)
https://bugs.ruby-lang.org/issues/2981?journal_id=9701
2010-04-02T08:55:03Z
znz (Kazuhiro NISHIYAMA)
<ul><li><strong>Target version</strong> set to <i>1.9.2</i></li><li><strong>Start date</strong> set to <i>03/18/2010</i></li></ul><p>=begin</p>
<p>=end</p>
Ruby master - Feature #2981: Array#repeated_(permutation|combination)
https://bugs.ruby-lang.org/issues/2981?journal_id=9911
2010-04-06T09:04:57Z
metanest (Makoto Kishimoto)
<ul><li><strong>File</strong> <a href="/attachments/931">repeated_patch.txt</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/931/repeated_patch.txt">repeated_patch.txt</a> added</li></ul><p>=begin<br>
patch for current trunk<br>
=end</p>
Ruby master - Feature #2981: Array#repeated_(permutation|combination)
https://bugs.ruby-lang.org/issues/2981?journal_id=10224
2010-04-16T16:27:05Z
matz (Yukihiro Matsumoto)
matz@ruby.or.jp
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>=begin<br>
This issue was solved with changeset r27352.<br>
Makoto, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<p>=end</p>