ptkwt / shell1.aracnet.com (Phil Tomson) wrote in message news:<acbadm02uri / enews1.newsguy.com>... > I would have thought so too, but I replaced the 12.times loop with: > > puts ">>>>>iteration: #{i}" > md.step > i+=1 > #repeated 12 times > > And got a similarly puzzling result - instead of being run 12 times it ran > 16, but in this case i didn't go back to 2 after the continuation was > called. That's exactly what should happen - md.step i += 1 md.step i += 1 #if you capture the continuation here md.step i += 1 #and invoke it here, #you'll jump back to where you were before #but i will keep its value These are just the semantics of callcc... I'm not sure what else to say. Again, if you want to keep your iteration loop separate, break it into a separate thread.