Class: Skiptrace::Rubinius::InternalLocationFilter
- Inherits:
-
Object
- Object
- Skiptrace::Rubinius::InternalLocationFilter
- Defined in:
- lib/skiptrace/internal/rubinius.rb
Overview
Filters internal Rubinius locations.
There are a couple of reasons why we wanna filter out the locations.
-
::Kernel.raise, is implemented in Ruby for Rubinius. We don’t wanna have the frame for it to align with the CRuby and JRuby implementations.
-
For internal methods location variables can be nil. We can’t create a bindings for them.
-
Bindings from the current file are considered internal and ignored.
We do that all that so we can align the bindings with the backtraces entries.
Instance Method Summary collapse
- #filter ⇒ Object
-
#initialize(locations) ⇒ InternalLocationFilter
constructor
A new instance of InternalLocationFilter.
Constructor Details
#initialize(locations) ⇒ InternalLocationFilter
Returns a new instance of InternalLocationFilter.
18 19 20 |
# File 'lib/skiptrace/internal/rubinius.rb', line 18 def initialize(locations) @locations = locations end |
Instance Method Details
#filter ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/skiptrace/internal/rubinius.rb', line 22 def filter @locations.reject do |location| location.file.start_with?('kernel/delta/kernel.rb') || location.file == __FILE__ || location.variables.nil? end end |