#374 open
Phil Hagelberg

Returning from a Proc within a method causes a LongReturnException

Reported by Phil Hagelberg | February 28th, 2008 @ 01:46 PM | in 1.0 preview

def proc_returner
  Proc.new { return }.call
end

proc_returner

An exception has occurred:
    LongReturnException (LongReturnException)

Backtrace:
            Compile.single_load at kernel/core/compile.rb:239
    Compile.load_from_extension at kernel/core/compile.rb:311
              Object#__script__ at kernel/loader.rb:257

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket