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

Assert return value of Readline.readline only if Ruby is before 2.7

This commit is contained in:
aycabta 2019-11-05 21:06:29 +09:00
parent c4b627e2da
commit 6aacef4948

View file

@ -36,7 +36,7 @@ module BasetestReadline
Readline.readline("> ", true) Readline.readline("> ", true)
} }
assert_equal("hello", line) assert_equal("hello", line)
assert_equal(true, line.tainted?) assert_equal(true, line.tainted?) if RUBY_VERSION < '2.7'
stdout.rewind stdout.rewind
assert_equal("> ", stdout.read(2)) assert_equal("> ", stdout.read(2))
assert_equal(1, Readline::HISTORY.length) assert_equal(1, Readline::HISTORY.length)