Skip to content
This repository

Ruby 2.0: locations and caller APIs can take ranges now #569

Closed
headius opened this Issue · 1 comment

2 participants

Charles Oliver Nutter Hiro Asari
Charles Oliver Nutter
Owner

Some examples:

def whoze_there_using_locations
  caller_locations(1,1)[0].label
end

loc = caller_locations(0..1).first
loc.label #=> a

And the RubyDoc does cover it:

http://ruby-doc.org/core-2.0/Kernel.html#method-i-caller
http://ruby-doc.org/core-2.0/Kernel.html#method-i-caller_locations

Hiro Asari
Owner

Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.