summaryrefslogtreecommitdiffstats
path: root/lib/redmine/scm/adapters/mercurial_adapter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine/scm/adapters/mercurial_adapter.rb')
-rw-r--r--lib/redmine/scm/adapters/mercurial_adapter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb
index b03da11c1..d5a87f2b3 100644
--- a/lib/redmine/scm/adapters/mercurial_adapter.rb
+++ b/lib/redmine/scm/adapters/mercurial_adapter.rb
@@ -297,10 +297,10 @@ module Redmine
# Runs 'hg' command with the given args
def hg(*args, &block)
# as of hg 4.4.1, early parsing of bool options is not terminated at '--'
- if args.any? { |s| s =~ HG_EARLY_BOOL_ARG }
+ if args.any? { |s| HG_EARLY_BOOL_ARG.match?(s) }
raise HgCommandArgumentError, "malicious command argument detected"
end
- if args.take_while { |s| s != '--' }.any? { |s| s =~ HG_EARLY_LIST_ARG }
+ if args.take_while { |s| s != '--' }.any? { |s| HG_EARLY_LIST_ARG.match?(s) }
raise HgCommandArgumentError, "malicious command argument detected"
end