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:
parent
05711adfb4
commit
ac0658e720
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ module BasetestReadline
|
||||||
# Work around lack of SecurityError in Reline
|
# Work around lack of SecurityError in Reline
|
||||||
# test mode with tainted prompt.
|
# test mode with tainted prompt.
|
||||||
# Also skip test on Ruby 2.7+, where $SAFE/taint is deprecated.
|
# 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
|
begin
|
||||||
Thread.start {
|
Thread.start {
|
||||||
$SAFE = 1
|
$SAFE = 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue