From 9341b11836b3ad341741d286cf7e7456449cdbc2 Mon Sep 17 00:00:00 2001 From: Lukas Zapletal Date: Fri, 23 Dec 2016 13:30:34 +0100 Subject: [PATCH] When pattern is nil, enhance_with_matching_rule will not fail --- lib/rake/task_manager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index b62edc8e3..7844f9ed9 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -126,7 +126,7 @@ def enhance_with_matching_rule(task_name, level=0) fail Rake::RuleRecursionOverflowError, "Rule Recursion Too Deep" if level >= 16 @rules.each do |pattern, args, extensions, block| - if pattern.match(task_name) + if pattern && pattern.match(task_name) task = attempt_rule(task_name, args, extensions, block, level) return task if task end