Lazy#zip should not call `lazy`
Current implementation of Lazy#zip has problems:
lazy when this is not excepted, necessary nor documented. Any reason to not call
lazy without checking previously for type:
.lazy.zip(42) # =>NoMethodError: undefined method `lazy' for 42:Fixnum
# expected same as .zip(42), i.e. a TypeError
3) inefficient in the case where all arguments are arrays
I'll address these when I get a chance. I don't understand why
lazy is called instead of
each though. Anyone?
Updated by marcandre (Marc-Andre Lafortune) about 7 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r38925.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- enumerator.c: Optimize Lazy#zip when passed only arrays [Bug #7706]