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 c2294ef commit addae99
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Master (Unreleased)

### Fixed

* 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
12 changes: 11 additions & 1 deletion test/commands/continue_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def program
13: b = 5
14: c = b + 5
15: #{example_class}.new.add_four(c)
16: end
16: eval('c')
17: end
EOC
end

Expand Down Expand Up @@ -77,5 +78,14 @@ def test_tracing_after_set_linetrace_and_continue
check_output_includes "Tracing: #{example_path}:14 c = b + 5"
end
end

def test_linetrace_does_not_show_a_line_in_eval_context
with_setting :linetrace, true do
enter 'cont'
debug_code(program)

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

0 comments on commit addae99

Please sign in to comment.