From e3de0ae59e8645f1827c87435a4d654a40c618a0 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Tue, 20 Feb 2024 04:45:00 +0900 Subject: [PATCH] catch up ruby 3.4.0 error related changes * should use `base_label` instead of `label`. * should accept both backtick or single quote * shoudl accept with class name --- lib/debug/thread_client.rb | 4 ++-- test/protocol/boot_config_raw_dap_test.rb | 4 ++-- test/protocol/threads_test.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/debug/thread_client.rb b/lib/debug/thread_client.rb index 753898560..6d8cf3f2c 100644 --- a/lib/debug/thread_client.rb +++ b/lib/debug/thread_client.rb @@ -989,7 +989,7 @@ def wait_next_action_ true else true if depth >= DEBUGGER__.frame_depth - 3 && - caller_locations(2, 1).first.label == target_location_label + caller_locations(2, 1).first.base_label == target_location_label # TODO: imcomplete condition end end @@ -1005,7 +1005,7 @@ def wait_next_action_ true if pat === tp.callee_id.to_s else # :return, :b_return true if depth >= DEBUGGER__.frame_depth - 3 && - caller_locations(2, 1).first.label == target_location_label + caller_locations(2, 1).first.base_label == target_location_label # TODO: imcomplete condition end end diff --git a/test/protocol/boot_config_raw_dap_test.rb b/test/protocol/boot_config_raw_dap_test.rb index dd32e790a..677becd63 100644 --- a/test/protocol/boot_config_raw_dap_test.rb +++ b/test/protocol/boot_config_raw_dap_test.rb @@ -120,7 +120,7 @@ def test_boot_configuration_works_correctly threads: [ { id: 1, - name: "#1 #{temp_file_path}:1:in `
'" + name: /\#1 #{temp_file_path}:1:in [`']
'/ } ] } @@ -141,7 +141,7 @@ def test_boot_configuration_works_correctly threads: [ { id: 1, - name: "#1 #{temp_file_path}:1:in `
'" + name: /\#1 #{temp_file_path}:1:in [`']
'/ } ] } diff --git a/test/protocol/threads_test.rb b/test/protocol/threads_test.rb index dc97bad1f..b27a4229f 100644 --- a/test/protocol/threads_test.rb +++ b/test/protocol/threads_test.rb @@ -20,8 +20,8 @@ def test_reponse_returns_correct_threads_info assert_threads_result( [ - /\.rb:\d:in `
'/, - /\.rb:\d:in `block in foo'/ + /\.rb:\d:in [`']
'/, + /\.rb:\d:in [`']block in (Object#)?foo'/ ] )