File: support-ruby-3.1.patch

package info (click to toggle)
ruby-typhoeus 1.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 656 kB
  • sloc: ruby: 4,489; makefile: 6
file content (20 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From: Daniel Leidert <daniel.leidert@debian.org>
Date: Mon, 6 Feb 2023 17:26:10 +0100
Subject: support Ruby 3.1

Fix keyword parameters for /usr/share/rubygems-integration/all/gems/rack-2.2.4/lib/rack/handler/webrick.rb:26:
 in `run': wrong number of arguments (given 2, expected 1) (ArgumentError)

diff --git a/spec/support/localhost_server.rb b/spec/support/localhost_server.rb
index c5a7508..da09600 100644
--- a/spec/support/localhost_server.rb
+++ b/spec/support/localhost_server.rb
@@ -43,7 +43,7 @@ class LocalhostServer
     # Use WEBrick since it's part of the ruby standard library and is available on all ruby interpreters.
     options = { :Port => port }
     options.merge!(:AccessLog => [], :Logger => WEBrick::BasicLog.new(StringIO.new)) unless ENV['VERBOSE_SERVER']
-    Rack::Handler::WEBrick.run(Identify.new(@rack_app), options)
+    Rack::Handler::WEBrick.run(Identify.new(@rack_app), **options)
   end
 
   def booted?