Skip to content
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
2 changes: 1 addition & 1 deletion lib/debug/thread_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def skip_config_skip_path?(path)
end

def skip_internal_path?(path)
path.start_with?(__dir__) || path.start_with?('<internal:')
path.start_with?(__dir__) || path.delete_prefix('!eval:').start_with?('<internal:')
end

def skip_location?(loc)
Expand Down
14 changes: 14 additions & 0 deletions test/console/control_flow_commands_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,20 @@ def test_unit_method_in_the_same_line
end
end

class SkipStepOnInternalCodeTest < ConsoleTestCase
def test_skip_step_on_internal_code
code = <<~RUBY
1| _a = 1.abs # step here and it should not step into Integer#abs's internal source
2| _b = _a.abs
RUBY
debug_code code do
type 's'
assert_line_num 2
type 'c'
end
end
end

#
# Tests that next/finish work for a deep call stack.
# We use different logic for computing frame depth when the call stack is above/below 4096.
Expand Down