Skip to content

Commit

Permalink
Accept Pathname object as rule's prerequisite
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmaro committed Dec 16, 2023
1 parent fe0b1ba commit 8e2e80a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/rake/task_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -302,18 +302,16 @@ def make_sources(task_name, task_pattern, extensions)
source == ext ? task_name.ext(ext) : source
when String, Symbol
ext.to_s
when Pathname
Rake.from_pathname(ext)
when Proc, Method
if ext.arity == 1
ext.call(task_name)
else
ext.call
end
else
if (ext = Rake.from_pathname(ext)).is_a?(String)
ext
else
fail "Don't know how to handle rule dependent: #{ext.inspect}"
end
fail "Don't know how to handle rule dependent: #{ext.inspect}"
end
}
result.flatten
Expand Down

0 comments on commit 8e2e80a

Please sign in to comment.