1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Description: Backport upstream patch to fix ruby-3.0 FTBFS
Author: Nilesh Patra <nilesh@debian.org>
Forwarded: not-needed
Last-Update: October 22, 2021
--- a/lib/librarian/dsl.rb
+++ b/lib/librarian/dsl.rb
@@ -79,14 +79,14 @@
Receiver.new(target)
end
- def run(specfile = nil, sources = [])
+ def run(specfile = nil, sources = [], &block)
specfile, sources = nil, specfile if specfile.kind_of?(Array) && sources.empty?
Target.new(self).tap do |target|
target.precache_sources(sources)
debug_named_source_cache("Pre-Cached Sources", target)
- specfile ||= Proc.new if block_given?
+ specfile ||= block if block_given?
if specfile.kind_of?(Pathname) and !File.exists?(specfile)
debug { "Specfile #{specfile} not found, using defaults" } unless specfile.nil?
|