From: ko1@... Date: 2017-01-31T09:33:34+00:00 Subject: [ruby-core:79357] [Ruby trunk Feature#7434][Closed] Allow caller_locations and backtrace_locations to receive negative params Issue #7434 has been updated by Koichi Sasada. Status changed from Assigned to Closed Maybe ok. ---------------------------------------- Feature #7434: Allow caller_locations and backtrace_locations to receive negative params https://bugs.ruby-lang.org/issues/7434#change-62782 * Author: Sam Saffron * Status: Closed * Priority: Normal * Assignee: Koichi Sasada * 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. -- https://bugs.ruby-lang.org/ Unsubscribe: