Skip to content

Commit

Permalink
Skip to get a line in eval context
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed May 14, 2016
1 parent 57fa05e commit 86c979f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Master (Unreleased)

* Skip to get a line in eval context (#263).

## 9.0.1 - 2016-05-14

* `quit` never exiting when remote debugging (#201).
Expand Down
2 changes: 1 addition & 1 deletion lib/byebug/helpers/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def shortpath(fullpath)
# True for special files like -e, false otherwise
#
def virtual_file?(name)
['(irb)', '-e', '(byebug)'].include?(name)
['(irb)', '-e', '(byebug)', '(eval)'].include?(name)
end
end
end
Expand Down
26 changes: 26 additions & 0 deletions test/linetrace_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
require 'test_helper'

module Byebug
#
# Tests linetrace functionality.
#
class LinetraceTest < TestCase
def program
strip_line_numbers <<-EOC
1: module Byebug
2: byebug
3: eval('nil')
4: end
EOC
end

def test_linetrace_does_not_show_lines_in_eval
with_setting :linetrace, false do
enter 'set linetrace', 'cont 3'
debug_code(program)

check_output_includes 'Tracing: (eval):1'
end
end
end
end

0 comments on commit 86c979f

Please sign in to comment.