Project

General

Profile

Actions

Bug #6501

closed

Documentation for Exception#set_backtrace is incorrect

Added by djberg96 (Daniel Berger) almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin10.8.0]
Backport:
[ruby-core:45269]

Description

The documentation for Exception#set_backtrace is incorrect. It currently says that its argument must be an array of strings.

/*
 *  call-seq:
 *     exc.set_backtrace(array)   ->  array
 *
 *  Sets the backtrace information associated with <i>exc</i>. The
 *  argument must be an array of <code>String</code> objects in the
 *  format described in <code>Exception#backtrace</code>.
 */

In fact, it will also accept a single string as an argument, which is a good thing, since it let's me do stuff like "raise SystemCallError, FFI.errno, 'some_function'". Otherwise I would have to use ['some_function'], which would be annoying.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0