Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip to get a line in eval context #263

Merged
merged 1 commit into from
May 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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