Skip to content

Commit 9341b11

Browse files
committed
When pattern is nil, enhance_with_matching_rule will not fail
1 parent c0cabec commit 9341b11

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/rake/task_manager.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def enhance_with_matching_rule(task_name, level=0)
126126
fail Rake::RuleRecursionOverflowError,
127127
"Rule Recursion Too Deep" if level >= 16
128128
@rules.each do |pattern, args, extensions, block|
129-
if pattern.match(task_name)
129+
if pattern && pattern.match(task_name)
130130
task = attempt_rule(task_name, args, extensions, block, level)
131131
return task if task
132132
end

0 commit comments

Comments
 (0)