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 3b7099f commit 75aa10d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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
6 changes: 4 additions & 2 deletions test/commands/set_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ def program
4: z = 4
5: z += 1
6: z + 1
7: end
7: eval('z')
8: end
EOC
end

Expand Down Expand Up @@ -133,7 +134,8 @@ def test_set_linetrace_enables_tracing_program_execution
debug_code(program)

check_output_includes \
'linetrace is on', "Tracing: #{example_path}:5 z += 1"
'linetrace is on', "Tracing: #{example_path}:5 z += 1",
'Tracing: (eval):1'
end
end

Expand Down

0 comments on commit 75aa10d

Please sign in to comment.