From fc9eb5b9c1b0a6f61735ace45ab39c281a55e8a3 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 25 Sep 2019 09:33:10 +0900 Subject: [ruby/io-console] Load the current libraries https://github.com/ruby/io-console/commit/ab7653c543 --- test/io/console/test_io_console.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/io') diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index c51c9dad3d..3cf21d22ec 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -7,6 +7,8 @@ rescue LoadError end class TestIO_Console < Test::Unit::TestCase + PATHS = $LOADED_FEATURES.grep(%r"/io/console(?:\.#{RbConfig::CONFIG['DLEXT']}|/\w+\.rb)\z") {$`} + # FreeBSD seems to hang on TTOU when running parallel tests # tested on FreeBSD 11.x def set_winsize_setup @@ -326,7 +328,7 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do end def run_pty(src, n = 1) - r, w, pid = PTY.spawn(EnvUtil.rubybin, "-rio/console", "-e", src) + r, w, pid = PTY.spawn(EnvUtil.rubybin, "-I#{TestIO_Console::PATHS.join(File::PATH_SEPARATOR)}", "-rio/console", "-e", src) rescue RuntimeError skip $! else -- cgit v1.2.3