Issue #7706 has been reported by marcandre (Marc-Andre Lafortune).

----------------------------------------
Bug #7706: Lazy#zip should not call `lazy`
https://bugs.ruby-lang.org/issues/7706

Author: marcandre (Marc-Andre Lafortune)
Status: Open
Priority: Normal
Assignee: marcandre (Marc-Andre Lafortune)
Category: core
Target version: 2.0.0
ruby -v: r38825


Current implementation of Lazy#zip has problems:

1) calls `lazy` when this is not excepted, necessary nor documented. Any reason to not call `each` instead?
2) calls `lazy` without checking previously for type:

    [1].lazy.zip(42) # =>NoMethodError: undefined method `lazy' for 42:Fixnum
   # expected same as [1].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?


-- 
http://bugs.ruby-lang.org/