Project

General

Profile

Actions

Bug #11108

closed

Unexpected LocalJumpError from "break" in nested begin block

Added by uta2ne (Yoshihisa Masuda) almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
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 1 (0 open1 closed)

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0