From c728a6c75e44701aaf9b8391091063dd95f16d7e Mon Sep 17 00:00:00 2001 From: noraj Date: Sun, 26 Jan 2025 00:50:02 +0100 Subject: [PATCH] remove useless rescue this should be useless now that uri is required explicitely as a gem and no longer relying on the default stdlib for older versions of ruby --- lib/ctf_party/defang.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/ctf_party/defang.rb b/lib/ctf_party/defang.rb index 1ec49e5..cb645cf 100644 --- a/lib/ctf_party/defang.rb +++ b/lib/ctf_party/defang.rb @@ -80,17 +80,6 @@ def defang_uri puts e return gsub('.', '[.]') end - begin - # temporary fix until backport for ruby 3.0 https://github.com/ruby/ruby/pull/7260 - # rubocop:disable Lint/Void - URI::WS - URI::WSS - # rubocop:enable Lint/Void - rescue NameError => e - puts e - require 'uri/ws' - require 'uri/wss' - end case uri when URI::HTTP, URI::HTTPS, URI::FTP uri.scheme = uri.scheme.gsub(/t/i, 'x')