From: Urabe Shyouhei Date: 2007-09-10T15:00:06+09:00 Subject: Re: New array methods cycle, choice, shuffle (plus bug in cycle) Wilson Bilkovich wrote: > So the above code is expected to behave as this would in Ruby 1.8? No. > ..or does zipping an external enumerator with 'more' entries operate > differently than zipping the two Arrays? Enumerator#zip works as the same as Array#zip. The trick is Array#cycle generates somewhat 'infinite' entries. irb(main):001:0> x = [1, 0].cycle => # irb(main):002:0> y = [1, 0, 0, 0, 0] => [1, 0, 0, 0, 0] irb(main):003:0> y.zip x do |z| p z end [1, 1] [0, 0] [0, 1] [0, 0] [0, 1] => nil irb(main):004:0> You know what's happening?