From: "zzak (Zachary Scott)" Date: 2012-12-31T13:04:54+09:00 Subject: [ruby-core:51204] [ruby-trunk - Feature #7434][Assigned] Allow caller_locations and backtrace_locations to receive negative params Issue #7434 has been updated by zzak (Zachary Scott). Status changed from Closed to Assigned I have committed a test for range argument in r38664, please check it. ---------------------------------------- Feature #7434: Allow caller_locations and backtrace_locations to receive negative params https://bugs.ruby-lang.org/issues/7434#change-35164 Author: sam.saffron (Sam Saffron) Status: Assigned Priority: Normal Assignee: ko1 (Koichi Sasada) Category: core Target version: next minor Further to http://bugs.ruby-lang.org/issues/7051 It would be nice if caller_locations and backtrace_locations has some parity with range apis. pry(main)> [1,2,3][0..-2] => [1, 2] Similarly: caller_locations(0,-2) # should strip the bottom frame This is actually quite important for diagnostics of Rails and other frameworks where the app code starts at a very deep frame. At the moment you are forced to materialize all frames just to discard. -- http://bugs.ruby-lang.org/