Skip to content

Commit

Permalink
remove useless rescue
Browse files Browse the repository at this point in the history
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
  • Loading branch information
noraj committed Jan 25, 2025
1 parent cb76d13 commit c728a6c
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/ctf_party/defang.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit c728a6c

Please sign in to comment.