General

Profile

piotrmurach (Piotr Murach)

  • Login: piotrmurach
  • Registered on: 07/14/2019
  • Last sign in: 06/23/2020

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 0 1

Activity

07/15/2019

08:21 PM Ruby Feature #16001: Provide an alias to Kernel#caller_locations(1,1) and Kernel#caller(1,1)
> Right, I'm thinking we should just improve the documentation of `caller` and `caller_locations` then,
> ...
This is quite a common thing to do and it's not only about performance, though the performance aspect is equally important. I ...
piotrmurach (Piotr Murach)

07/14/2019

09:41 PM Ruby Feature #16001: Provide an alias to Kernel#caller_locations(1,1) and Kernel#caller(1,1)
> it's not an alias for brevity
Definitely not brevity but clarity certainly. The `caller(1,1)` seems cryptic as compared to `direct_caller` which is more expressive.

> ...
That's a very important point. Limiting the full backtra...
piotrmurach (Piotr Murach)
11:06 AM Ruby Feature #16001: Provide an alias to Kernel#caller_locations(1,1) and Kernel#caller(1,1)
Eregon (Benoit Daloze) wrote:
> Maybe `direct_caller`?
> ...
That's a very good point. I'd probably lean towards modern API of `caller_locations(1,1)` if we only used a single alias. However, we could follow a pattern and name `caller_...
piotrmurach (Piotr Murach)
10:08 AM Ruby Feature #16001 (Open): Provide an alias to Kernel#caller_locations(1,1) and Kernel#caller(1,1)
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 - a common mistake.
The currently ...
piotrmurach (Piotr Murach)

Also available in: Atom