Skip to content

Commit

Permalink
Fix logic for finding tag file from spec description
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Oct 30, 2023
1 parent 972dc6e commit d03ad9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tool/tag_from_output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d03ad9c

Please sign in to comment.