diff --git a/lib/debug/session.rb b/lib/debug/session.rb index 3d973c3d2..f76f9dc6d 100644 --- a/lib/debug/session.rb +++ b/lib/debug/session.rb @@ -2190,6 +2190,7 @@ def self.require_location case loc.absolute_path when dir_prefix when %r{rubygems/core_ext/kernel_require\.rb} + when %r{bundled_gems\.rb} else return loc if loc.absolute_path end diff --git a/test/console/rdbg_option_test.rb b/test/console/rdbg_option_test.rb index 615b07ef3..c173c33bd 100644 --- a/test/console/rdbg_option_test.rb +++ b/test/console/rdbg_option_test.rb @@ -72,7 +72,7 @@ def program def test_debugger_stops_immediately run_rdbg(program, options: "--stop-at-load") do # stops at the earliest possible location - assert_line_text(/\[C\] Kernel#require/) + assert_line_text(/\[C\] Kernel[#\.]require/) type "c" type "a + 'bar'" assert_line_text(/foobar/)