Project

General

Profile

Actions

Bug #1707

closed

Proc#call Raises ThreadError on 1.8 HEAD; LocalJumpError on Other Versions

Added by runpaint (Run Paint Run Run) almost 15 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.8.8dev (2009-06-28) [i686-linux]
[ruby-core:24097]

Description

=begin
The code below raises a LocalJumpError on 1.8.6, 1.8.7, and 1.9 HEAD. It raises a ThreadError ("return can't jump across threads") on 1.8 HEAD.

 def some_method(&b) b end
 a_proc = Proc.new { return }
 res = some_method(&a_proc)
 res.call

Is this difference intentional? If so, why?

Versions

  • ruby 1.8.6 (2009-06-08 patchlevel 369) [i686-linux]
  • ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-linux]
  • ruby 1.8.8dev (2009-06-28) [i686-linux]
  • ruby 1.9.2dev (2009-06-27 trunk 23871) [i686-linux]
    =end
Actions #1

Updated by matz (Yukihiro Matsumoto) almost 15 years ago

=begin
Hi,

In message "Re: [ruby-core:24097] [Bug #1707] Proc#call Raises ThreadError on 1.8 HEAD; LocalJumpError on Other Versions"
on Wed, 1 Jul 2009 01:07:46 +0900, Run Paint Run Run writes:

|The code below raises a LocalJumpError on 1.8.6, 1.8.7, and 1.9 HEAD. It raises a ThreadError ("return can't jump across threads") on 1.8 HEAD.
|
| def some_method(&b) b end
| a_proc = Proc.new { return }
| res = some_method(&a_proc)
| res.call
|
|Is this difference intentional? If so, why?

It's not intentional.

						matz.

=end

Actions #2

Updated by nobu (Nobuyoshi Nakada) almost 15 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r23922.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0