summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
Diffstat (limited to 'tool')
-rw-r--r--tool/lib/test/unit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb
index 8832022fbe..2d5a32ed67 100644
--- a/tool/lib/test/unit.rb
+++ b/tool/lib/test/unit.rb
@@ -872,7 +872,7 @@ module Test
return File.join(File.dirname(f), basename+'.rb')
elsif /\Atest_/ !~ basename
return File.join(File.dirname(f), 'test_'+basename)
- end if /#{basename}\z/ =~ f # otherwise basename is dirname/
+ end if f.end_with?(basename) # otherwise basename is dirname/
raise ArgumentError, "file not found: #{orig_f}"
end