On Sat, Mar 1, 2008 at 11:37 AM, Giles Bowkett <[EMAIL PROTECTED]> wrote:
> I appear to have written code which travels backwards through time:
>
>  http://www.vimeo.com/742590
>
>  This disturbs me immensely. If anyone can explain it, that would be cool.
>
>  I think it's an illusion brought about by how RSpec wraps the code it
>  executes, and by the sheer weirdness of continuations.

This has absolutely nothing to do with RSpec. Do the same thing in
test/unit and you'll find the same result
(http://pastie.caboo.se/159803)

Continuations ARE time machines. So when you called the continuation
again, it does in fact go back to where it exited the loop (from the
interrupt).

Now I haven't looked to see why the second time "through time" it's
not working, but it actually makes perfect sense that it goes back in
time.

FWIW,
David

>
>  --
>  Giles Bowkett
>
>  Blog: http://gilesbowkett.blogspot.com
>  Portfolio: http://www.gilesgoatboy.org
>  Tumblelog: http://giles.tumblr.com
>  Podcast: http://hollywoodgrit.blogspot.com
>  _______________________________________________
>  rspec-users mailing list
>  rspec-users@rubyforge.org
>  http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to