summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-08-11 10:15:05 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-08-11 10:15:05 +0900
commitf731cc0984560d8dabd211e7b827617fe078cca1 (patch)
treea948689381df907a6500755dcba9d4fb8e534ec1 /tool
parent2990c2cc3e5a105013b829dad00fa43a26da8682 (diff)
Use `end_with?` instead of Regexp with missing escape
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