Kirk Haines wrote:

> module Kernel
>         def returning(*vals)
>                 yield *vals
>         end
> end

That'd return the last value of the block, not the value passed to
returning.

Also, the returning "function" is apparently also known as the K
combinator (there are many other interesting combinators in lambda
calculus, such as the Y combinator; see, for example,
http://en.wikipedia.org/wiki/Y_combinator) and can
be found in
vendor/rails/activesupport/lib/active_support/core_ext/kernel.rb in the
Rails distribution,
        nikolai

-- 
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}