From 055d4495cc06e946bd893c4c56fc63bbaa1d7f16 Mon Sep 17 00:00:00 2001 From: Marcus Ilgner Date: Wed, 18 Dec 2019 13:52:19 +0100 Subject: [PATCH] Fix Scanner#internal_source? w/ Bundler::URI::HTTP Trying to use bundler-audit with Bundler 2.1.1 fails because `Scanner#internal_source?` gets passed a `Bundler::URI::HTTP` instance. ``` uri/common.rb:745:in `URI': bad argument (expected URI object or URI string) (ArgumentError) ``` This patch uses `#to_s` on the passed object to work around that issue. --- lib/bundler/audit/scanner.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bundler/audit/scanner.rb b/lib/bundler/audit/scanner.rb index 145a0dea..eb277dc8 100644 --- a/lib/bundler/audit/scanner.rb +++ b/lib/bundler/audit/scanner.rb @@ -167,7 +167,7 @@ def scan_specs(options={}) # @return [Boolean] # def internal_source?(uri) - uri = URI(uri) + uri = URI.parse(uri.to_s) internal_host?(uri.host) if uri.host end