maxtaco / coffee-script

IcedCoffeeScript
http://maxtaco.github.com/coffee-script
MIT License
726 stars 58 forks source link

for .. by is broken #27

Closed maxtaco closed 12 years ago

maxtaco commented 12 years ago

This doesn't work as expected:

for i in [0..11] by 3
  await setTimeout defer(), 100
  console.log "#{i}"
capndesign commented 12 years ago

One thing that it looks like you missed is that two dots behave differently than three. So [0..1] should return [0,1] and [0...1] should return [0]. The three dots is behaving like two when using an await inside a loop, so [0...1] incorrectly returns [0,1].

maxtaco commented 12 years ago

Closed in 72b1468, hopefully for good.