Class: Byebug::Context
- Inherits:
-
Object
- Object
- Byebug::Context
- Defined in:
- lib/byebug/context_xml.rb
Constant Summary collapse
- IGNORED_XML_FILES =
Dir.glob(File.('../../../**/*', __FILE__))
Class Method Summary collapse
Class Method Details
.ignored_with_xml(path) ⇒ Object Also known as: ignored
16 17 18 19 20 21 22 23 |
# File 'lib/byebug/context_xml.rb', line 16 def ignored_with_xml(path) result = ignored_without_xml(path) || IGNORED_XML_FILES.include?(path) || !!path.match(/^\(eval\)/) || !!path.match(/rdebug-vim$/) || !!path.match(/rdebug-ide$/) result end |
.stack_size(byebug_frames = false) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/byebug/context_xml.rb', line 6 def stack_size(byebug_frames = false) backtrace = Thread.current.backtrace_locations(0) return 0 unless backtrace unless byebug_frames backtrace = backtrace.select { |l| !ignored(l.path) } end backtrace.size end |