Project

General

Profile

Actions

Bug #1617

closed

Exception Raised by Uncaught Throw (Disagreement Between Documentation and Reality)

Bug #1617: Exception Raised by Uncaught Throw (Disagreement Between Documentation and Reality)

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

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2dev (2009-06-01 trunk 23614) [i686-linux]
Backport:
[ruby-core:23824]

Description

=begin
On 1.9 an ArgumentError is raised when a symbol is thrown without being subsequently caught:

 >> throw :foo
 ArgumentError: uncaught throw :foo
from (irb):2:in `throw'
from (irb):2
from /usr/local/bin/irb:12:in `<main>'

The documentation for throw states "Raises +NameError+ if there is no +catch+ block for the symbol." Either the documentation or the code is wrong. (Question previously raised in [ruby-core:17629] by Vladimir Sizikov nearly a year ago).
=end

Actions

Also available in: PDF Atom