Project

General

Profile

Actions

Feature #5016

closed

Kernel#caller with negative limit should limit result to N initial frames

Added by now (Nikolai Weibull) almost 13 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
[ruby-core:37988]

Description

Calling Kernel#caller with a negative limit should limit result to N initial frames. When using Kernel#caller you often only want the first element of the result to get the information of the immediate caller. Generating the whole backtrace in this case is wasteful and time-consuming. Allowing Kernel#caller to take a negative limit to only return the first -N initial stack frames would allow for this.


Related issues 2 (0 open2 closed)

Related to Ruby master - Feature #1906: Kernel#backtrace: Objectifying Kernel#callerClosedmatz (Yukihiro Matsumoto)08/07/2009Actions
Related to Ruby master - Feature #3917: [proposal] called_from() which is much faster than caller()Closedko1 (Koichi Sasada)10/08/2010Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0