summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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