Ruby Blocks Vs Smalltalk Blocks

Are these things really the same?

Am I misunderstanding or what?

    require "Continuation"
    callcc do | ret |
       (1..10).each do | i |
          ret i

This replicates the SmallTalk behavior. So, they are the same thing, but with different concepts of return. See CallCc.

See also SmalltalkBlocksAndClosures, BlocksInRuby, BlocksInManyLanguages
CategoryRuby CategorySmalltalk

View edit of April 24, 2013 or FindPage with title or text search