General

Profile

knu (Akinori MUSHA)

  • Login: knu
  • Email: knu@ruby-lang.org
  • Registered on: 04/28/2008
  • Last sign in: 12/17/2025

Issues

open closed Total
Assigned issues 11 108 119
Reported issues 1 21 22

Projects

Project Roles Registered on
Ruby Committer 04/28/2008

Activity

12/17/2025

09:55 AM Ruby Bug #21780: Change the default size of Enumerator.produce back to infinity
The choice of the default is a design decision, with valid arguments for both options. That said, with limited time before release, I'll err on the safe side and prioritize compatibility by reverting to the original default of infinity. knu (Akinori MUSHA)
08:32 AM Ruby Bug #21780 (Open): Change the default size of Enumerator.produce back to infinity
knu (Akinori MUSHA)
08:11 AM Ruby Bug #21780: Change the default size of Enumerator.produce back to infinity
I'll revert Enumerator#to_set right away as a first step. knu (Akinori MUSHA)
08:06 AM Ruby Bug #21780: Change the default size of Enumerator.produce back to infinity
mame (Yusuke Endoh) wrote in #note-26:
> If we do so, I believe `Enumerator#size` should be deprecated and renamed to something like `Enumerator#size_hint` or `Enumerator#size_estimate`.
> ...
I think size is and will always be an esti...
knu (Akinori MUSHA)

12/16/2025

02:54 PM Ruby Bug #21780: Change the default size of Enumerator.produce back to infinity
The point of this discussion is that fixing the "bug" broke compatibility, and we are comparing the impacts. That "bug" can or should be properly fixed by changing the code to `Enumerator.produce(1, size: nil) { raise StopIteration }.la... knu (Akinori MUSHA)
02:36 PM Ruby Bug #21780: Change the default size of Enumerator.produce back to infinity
mame (Yusuke Endoh) wrote in #note-16:
> What problem do you have if the size is `nil`?
Among others, `Enumerator.produce(1) { it+1 }.lazy.take(5)` now returns nil, which returned 5 previously.
https://github.com/ruby/ruby/blob/6b...
knu (Akinori MUSHA)
01:12 PM Ruby Bug #21780: Change the default size of Enumerator.produce back to infinity
I'm leaning toward doing these:
- Removing the Enumerator#to_set override that refuses to work against an infinite enumerator as a safeguard
- Reverting the default size of Enumerator.produce from nil to infinity
This way we can g...
knu (Akinori MUSHA)
01:00 PM Ruby Bug #21780: Change the default size of Enumerator.produce back to infinity
zverok (Victor Shepelev) wrote in #note-7:
> 2) Somebody uses `Enumerator.produce` alongside other types of enumerators. In some branch of their code, they do `raise "Can't do this operation" if enum.size == Float::INFINITY`. The compati...
knu (Akinori MUSHA)
12:12 PM Ruby Bug #21780: Change the default size of Enumerator.produce back to infinity
I may have misread your comment. Let me review again. knu (Akinori MUSHA)
11:53 AM Ruby Bug #21780: Change the default size of Enumerator.produce back to infinity
zverok (Victor Shepelev) wrote in #note-7:
> TBH, I don't see the compatibility argument applied with any consistency here.
> ...
This is where you are mistaken.
- Ruby 3.4.7
```shellsession
% ruby -ve 'e=Enumerator.produce(1) {it>...
knu (Akinori MUSHA)

Also available in: Atom