summaryrefslogtreecommitdiff
path: root/test/readline/helper.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2020-02-09 17:18:41 +0900
committeraycabta <aycabta@gmail.com>2020-02-09 20:22:12 +0900
commitfd6746c7a651d4a504073726d56be610e1081b78 (patch)
tree8fbf6faeed6a8a0b5bf2214ba2523a7d7ca5991a /test/readline/helper.rb
parenta629f147cd255b9887ce05a803431e243b925d08 (diff)
[ruby/readline-ext] Use require check instead of DONT_RUN_RELINE_TEST env
https://github.com/ruby/readline-ext/commit/1df99d1481
Diffstat (limited to 'test/readline/helper.rb')
-rw-r--r--test/readline/helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/readline/helper.rb b/test/readline/helper.rb
index d5f02573ec..1b80327b57 100644
--- a/test/readline/helper.rb
+++ b/test/readline/helper.rb
@@ -9,8 +9,10 @@ def use_ext_readline # Use ext/readline as Readline
Object.const_set(:Readline, ReadlineSo)
end
-unless ENV['DONT_RUN_RELINE_TEST']
+begin
require "reline"
+rescue LoadError
+else
def use_lib_reline # Use lib/reline as Readline
Reline.send(:remove_const, 'IOGate') if Reline.const_defined?('IOGate')
Reline.const_set('IOGate', Reline::GeneralIO)