From 2b108d8e51ef22c3fd52d6b4973bcca84a872ba2 Mon Sep 17 00:00:00 2001 From: Matthew Lewis Date: Thu, 12 Jun 2014 13:58:09 -0700 Subject: [PATCH] Replace regex startswith with the start_with method to avoid regex escaping issues --- lib/synx/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/synx/project.rb b/lib/synx/project.rb index 8cfe5c7..36203a2 100644 --- a/lib/synx/project.rb +++ b/lib/synx/project.rb @@ -87,7 +87,7 @@ module Synx end def pathname_is_inside_root_pathname?(grandchild_pathname) - grandchild_pathname.realpath.to_s =~ /^#{root_pathname.realpath.to_s}/ + grandchild_pathname.realpath.to_s.start_with?(root_pathname.realpath.to_s) end def group_exclusions=(new_exclusions)