Skip to content

Commit

Permalink
Simplify handling of a LoadError
Browse files Browse the repository at this point in the history
The `LoadError` has a `path` reader in all supported rubies.
  • Loading branch information
deivid-rodriguez authored and hsbt committed Jun 17, 2020
1 parent e0337ce commit 967dba1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/rubygems/test_gem_remote_fetcher.rb
Expand Up @@ -5,8 +5,7 @@
begin
require 'webrick/https'
rescue LoadError => e
raise unless (e.respond_to?(:path) && e.path == 'openssl') ||
e.message =~ / -- openssl$/
raise unless e.path == 'openssl'
end

unless defined?(OpenSSL::SSL)
Expand Down

0 comments on commit 967dba1

Please sign in to comment.