File: fix-ruby3.0-FTBFS.patch

package info (click to toggle)
ruby-librarian 0.6.4-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 628 kB
  • sloc: ruby: 5,991; makefile: 11
file content (23 lines) | stat: -rw-r--r-- 848 bytes parent folder | download
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?