<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_enumerator.rb, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) b176d4f52e4af67654814dab3e9c5f4bf9170e54: [Backport #21008]</title>
<updated>2025-01-11T06:32:49+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-01-11T06:32:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=845763fdf370846938b86a062827b237313c924f'/>
<id>845763fdf370846938b86a062827b237313c924f</id>
<content type='text'>
	[Bug #21008] Normalize before sum to float

	After switching to `Float`-mode when summing `Numeric` objects,
	normalization for `Float` is still needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #21008] Normalize before sum to float

	After switching to `Float`-mode when summing `Numeric` objects,
	normalization for `Float` is still needed.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) f15123c34ce80f3928612befe2a9aaf4c9d27fda: [Backport #18743]</title>
<updated>2024-02-25T09:29:16+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-02-25T09:29:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5e4606423da96c2e26b00981c22bddfce0d970bf'/>
<id>5e4606423da96c2e26b00981c22bddfce0d970bf</id>
<content type='text'>
	Fix stack trace for rescued StopIteration

	---
	 enumerator.c                 | 15 +++++++++++++--
	 test/ruby/test_enumerator.rb | 20 ++++++++++++++++++++
	 2 files changed, 33 insertions(+), 2 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix stack trace for rescued StopIteration

	---
	 enumerator.c                 | 15 +++++++++++++--
	 test/ruby/test_enumerator.rb | 20 ++++++++++++++++++++
	 2 files changed, 33 insertions(+), 2 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>Make Enumerartor.product return nil when called with a block</title>
<updated>2022-12-21T10:13:15+00:00</updated>
<author>
<name>Akinori MUSHA</name>
<email>knu@idaemons.org</email>
</author>
<published>2022-12-21T10:13:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cc4c28ec2efa71b1c8afb4ce11409ad7b5ca1c95'/>
<id>cc4c28ec2efa71b1c8afb4ce11409ad7b5ca1c95</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make product consistently yield an array of N elements instead of N arguments</title>
<updated>2022-12-21T09:19:19+00:00</updated>
<author>
<name>Akinori MUSHA</name>
<email>knu@idaemons.org</email>
</author>
<published>2022-12-21T09:19:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=308ccbaeb2c1c0e78d59c0411ddbeede8d2324f0'/>
<id>308ccbaeb2c1c0e78d59c0411ddbeede8d2324f0</id>
<content type='text'>
Inconsistency pointed out by @mame:

```
&gt;&gt; Enumerator.product([1], [2], [3]).to_a
=&gt; [[1, 2, 3]]
&gt;&gt; Enumerator.product([1], [2]).to_a
=&gt; [[1, 2]]
&gt;&gt; Enumerator.product([1]).to_a
=&gt; [1]
&gt;&gt; Enumerator.product().to_a
=&gt; [nil]
```

Got fixed as follows:

```
&gt;&gt; Enumerator.product([1], [2], [3]).to_a
=&gt; [[1, 2, 3]]
&gt;&gt; Enumerator.product([1], [2]).to_a
=&gt; [[1, 2]]
&gt;&gt; Enumerator.product([1]).to_a
=&gt; [[1]]
&gt;&gt; Enumerator.product().to_a
=&gt; [[]]
```

This was due to the nature of the N-argument funcall in Ruby.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Inconsistency pointed out by @mame:

```
&gt;&gt; Enumerator.product([1], [2], [3]).to_a
=&gt; [[1, 2, 3]]
&gt;&gt; Enumerator.product([1], [2]).to_a
=&gt; [[1, 2]]
&gt;&gt; Enumerator.product([1]).to_a
=&gt; [1]
&gt;&gt; Enumerator.product().to_a
=&gt; [nil]
```

Got fixed as follows:

```
&gt;&gt; Enumerator.product([1], [2], [3]).to_a
=&gt; [[1, 2, 3]]
&gt;&gt; Enumerator.product([1], [2]).to_a
=&gt; [[1, 2]]
&gt;&gt; Enumerator.product([1]).to_a
=&gt; [[1]]
&gt;&gt; Enumerator.product().to_a
=&gt; [[]]
```

This was due to the nature of the N-argument funcall in Ruby.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reject keyword arguments given to Enumerator::Product.new</title>
<updated>2022-12-16T04:32:13+00:00</updated>
<author>
<name>Akinori MUSHA</name>
<email>knu@idaemons.org</email>
</author>
<published>2022-12-16T04:32:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ad18d1297ed82aa9c38375532b0b709131cf1ae7'/>
<id>ad18d1297ed82aa9c38375532b0b709131cf1ae7</id>
<content type='text'>
The use of keyword arguments should be reserved for future extension.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The use of keyword arguments should be reserved for future extension.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement Enumerator::Product and Enumerator.product [Feature #18685]</title>
<updated>2022-07-30T11:05:14+00:00</updated>
<author>
<name>Akinori MUSHA</name>
<email>knu@idaemons.org</email>
</author>
<published>2022-07-29T04:56:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1a73a6cdd2068b815430b775fe25186dab693faa'/>
<id>1a73a6cdd2068b815430b775fe25186dab693faa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use capture_output instead of capture_io</title>
<updated>2021-09-13T12:14:42+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2021-09-13T12:14:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ec6f04c092027102369acfe19368e65ee07d8b52'/>
<id>ec6f04c092027102369acfe19368e65ee07d8b52</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Undef Enumerator::Chain#{feed,next,next_values,peek,peek_values}</title>
<updated>2021-03-06T21:56:16+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-03-05T20:47:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=68d028578a5975fe6c44d29c502615ff9af72927'/>
<id>68d028578a5975fe6c44d29c502615ff9af72927</id>
<content type='text'>
Previously these methods were defined but raised TypeError, which
seems worse.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously these methods were defined but raised TypeError, which
seems worse.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make Enumerator#{+,chain} create lazy chain if any included enumerator is lazy</title>
<updated>2021-03-06T21:56:16+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-03-05T20:25:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e1d16a9e560a615e122e457325bcfb7c47228ed6'/>
<id>e1d16a9e560a615e122e457325bcfb7c47228ed6</id>
<content type='text'>
Implements [Feature #17347]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implements [Feature #17347]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix calling enumerator methods such as with_index on Enumerator::Chain</title>
<updated>2021-03-06T21:56:16+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2020-11-24T22:05:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bf40fe9fed19a5e22081b133661c0629988f1618'/>
<id>bf40fe9fed19a5e22081b133661c0629988f1618</id>
<content type='text'>
This previously raised a TypeError.  Wrap the Enumerator::Chain in
an Enumerator to work around the problem.

Fixes [Bug #17216]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This previously raised a TypeError.  Wrap the Enumerator::Chain in
an Enumerator to work around the problem.

Fixes [Bug #17216]
</pre>
</div>
</content>
</entry>
</feed>
