Project

General

Profile

Bug #11108

Unexpected LocalJumpError from "break" in nested begin block

Added by uta2ne (Yoshihisa Masuda) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
[ruby-dev:48950]

Description

The script below raises an unexpected "LocalJumpError".

%w(a b c).each { |c|
  p c
  begin
    raise
  rescue => e
    begin
      raise
    rescue => e
      break
    end
  end
}

Related issues

Is duplicate of Ruby master - Bug #10775: "break" from a block with nested begin-rescue became impossibleClosedActions

Updated by uta2ne (Yoshihisa Masuda) over 5 years ago

The script below raises an unexpected "LocalJumpError".

%w(a b c).each { |c|
  p c
  begin
    raise
  rescue =e
    begin
      raise
    rescue =e
      break
    end
  end
}
#2

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

  • Is duplicate of Bug #10775: "break" from a block with nested begin-rescue became impossible added

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

  • Description updated (diff)
  • Status changed from Open to Closed

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED
#5

Updated by nagachika (Tomoyuki Chikanaga) over 5 years ago

  • Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE

Backported into ruby_2_2 branch at r50563.

Also available in: Atom PDF