From: chris@... Date: 2019-07-15T10:38:30+00:00 Subject: [ruby-core:93786] [Ruby master Feature#16001] Provide an alias to Kernel#caller_locations(1, 1) and Kernel#caller(1, 1) Issue #16001 has been updated by chrisseaton (Chris Seaton). @eregon the answer is in the former version of this issue - 'avoid common beginner mistakes getting full backtrace information' - it improves performance by being obvious when you look in the docs and helping people avoid getting the full backtrace when they only need a bit of it. ---------------------------------------- Feature #16001: Provide an alias to Kernel#caller_locations(1,1) and Kernel#caller(1,1) https://bugs.ruby-lang.org/issues/16001#change-79441 * Author: piotrmurach (Piotr Murach) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- As it is common to use `caller_locations(1,1)` and `caller(1,1)`, this proposes aliases to help get the previous backtrace frame and improve performance by avoiding getting full backtrace information. The currently suggestions are: * `immediate_caller` * `first_caller` * `caller_only` This feature request is based on a conversation with Charles Nutter who says: > This is such a common thing... maybe we need to add something like #caller_only or #caller1 that basically do caller(1,1). -- https://bugs.ruby-lang.org/ Unsubscribe: