[前][次][番号順一覧][スレッド一覧]

ruby-changes:61749

From: David <ko1@a...>
Date: Wed, 17 Jun 2020 21:17:27 +0900 (JST)
Subject: [ruby-changes:61749] 967dba157c (master): Simplify handling of a `LoadError`

https://git.ruby-lang.org/ruby.git/commit/?id=967dba157c

From 967dba157ca8a4864435d6dd0cf0bb68f83dafe1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Tue, 16 Jun 2020 13:14:32 +0200
Subject: Simplify handling of a `LoadError`

The `LoadError` has a `path` reader in all supported rubies.

diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb
index e39c57d..f7542ff 100644
--- a/test/rubygems/test_gem_remote_fetcher.rb
+++ b/test/rubygems/test_gem_remote_fetcher.rb
@@ -5,8 +5,7 @@ require 'webrick' https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_remote_fetcher.rb#L5
 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)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]