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

Closed
headius opened this Issue Mar 9, 2013 · 1 comment

2 participants

@headius
JRuby Team member

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

@BanzaiMan
JRuby Team member

Closing this one.

@BanzaiMan BanzaiMan closed this Apr 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment