From c268e36e44e60449365cc11a4087c1c1d3b13a1d Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 11 Nov 2019 18:12:34 +0900 Subject: Require `Regexp.escape` before interpolating `build_dir`; fix #4817 --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 28e2d75c8..69c7d4c89 100644 --- a/Rakefile +++ b/Rakefile @@ -62,7 +62,7 @@ MRuby.each_target do |target| relative_from_root = gem.dir.relative_path_from(MRUBY_ROOT) current_build_dir = File.expand_path "#{build_dir}/#{relative_from_root}" - if current_build_dir !~ /^#{build_dir}/ + if current_build_dir !~ /^#{Regexp.escape(build_dir)}/ current_build_dir = "#{build_dir}/mrbgems/#{gem.name}" end -- cgit v1.2.3