Submitted by flgr (Wed Oct 01 19:10:40 UTC 2003)
I'm not sure whether this is a bug or just a missing feature, but #zip seems to be lacking some symmetry:
("a".."b").zip([1, 2]) # => [["a", 1], ["b", 2]] [1, 2].zip("a".."b") # TypeError: cannot convert Range into Array
IMHO both should produce the same result which I'd assume to be no exception.
Comments | Current voting | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
RCRchive copyright © David Alan Black, 2003-2005.
Powered by .
Re: Enumerable#zip(an_enumerable) (, 2003-10-02 18:17:25)
Kero.