[Sam McCall <tunah.usenet / tunah.net>, 2004-07-22 08.52 CEST]
> The following gives me weird results:
> (Typed into IRB. The results are similar in ruby but because of the 
> simple example you get an infinite loop)
> 
> =================================
> # Allow a continuation to escape
> store_cont = proc {|cont| $cont=cont; nil}
> 
> puts "[#{callcc &store_cont}]"
> # prints '[]', as expected
> 
> $cont.call("hello")
> # prints '[]hello]'
> # expected '[hello]'

My guess is, the line with the puts and the interpolated string is
internally translated to something like:

s = "["
s << callcc &store_cont
s << "]"

puts s

--