From 967dba157ca8a4864435d6dd0cf0bb68f83dafe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 16 Jun 2020 13:14:32 +0200 Subject: [PATCH] Simplify handling of a `LoadError` The `LoadError` has a `path` reader in all supported rubies. --- test/rubygems/test_gem_remote_fetcher.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb index e39c57d7cdaa2e..f7542ff406d9ff 100644 --- a/test/rubygems/test_gem_remote_fetcher.rb +++ b/test/rubygems/test_gem_remote_fetcher.rb @@ -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)