summaryrefslogtreecommitdiff
path: root/test/optparse/test_did_you_mean.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-29 11:25:23 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-29 11:25:23 +0900
commit5ad32d5504499f1a915d5d30e59dfd98da6759c6 (patch)
tree3671047cf20f6430739402ad7a1b83b96d78dc3b /test/optparse/test_did_you_mean.rb
parentf83bebdf7a76e1ade3c5dc9d54cbffb9f761b453 (diff)
`LoadError` is not a subclass of `StandardError`
Diffstat (limited to 'test/optparse/test_did_you_mean.rb')
-rw-r--r--test/optparse/test_did_you_mean.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/optparse/test_did_you_mean.rb b/test/optparse/test_did_you_mean.rb
index 57fa1e9b0e1..763062586cc 100644
--- a/test/optparse/test_did_you_mean.rb
+++ b/test/optparse/test_did_you_mean.rb
@@ -1,6 +1,10 @@
# frozen_string_literal: false
require_relative 'test_optparse'
-require "did_you_mean" rescue return
+begin
+ require "did_you_mean"
+rescue LoadError
+ return
+end
class TestOptionParser::DidYouMean < TestOptionParser
def setup