1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/readline-ext] Check TestRelineAsReadline existance

https://github.com/ruby/readline-ext/commit/c0a6303168
This commit is contained in:
aycabta 2020-02-09 16:41:07 +09:00
parent 05711adfb4
commit ac0658e720

View file

@ -45,7 +45,7 @@ module BasetestReadline
# Work around lack of SecurityError in Reline
# test mode with tainted prompt.
# Also skip test on Ruby 2.7+, where $SAFE/taint is deprecated.
if RUBY_VERSION < '2.7' && !kind_of?(TestRelineAsReadline)
if RUBY_VERSION < '2.7' && defined?(TestRelineAsReadline) && !kind_of?(TestRelineAsReadline)
begin
Thread.start {
$SAFE = 1