From d03ad9cb3f34f95c89e02f3bf6a8a33ec43e8fe1 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Mon, 30 Oct 2023 14:17:21 +0100 Subject: [PATCH] Fix logic for finding tag file from spec description --- tool/tag_from_output.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tool/tag_from_output.rb b/tool/tag_from_output.rb index 025a040..b6b4603 100755 --- a/tool/tag_from_output.rb +++ b/tool/tag_from_output.rb @@ -32,9 +32,9 @@ if spec_file spec_file = spec_file[SPEC_FILE, 1] or raise else - if error_line =~ /^(\w+)[#\.](\w+) / - module_method = error_line.split(' ', 2).first - file = "#{$1.downcase}/#{$2}_spec.rb" + if error_line =~ /^([\w:]+)[#\.](\w+) / + mod, method = $1, $2 + file = "#{mod.downcase.gsub('::', '/')}/#{method}_spec.rb" spec_file = ['spec/ruby/core', 'spec/ruby/library', *Dir.glob('spec/ruby/library/*')].find { |dir| path = "#{dir}/#{file}" break path if File.exist?(path)