Skip to content

Commit ab7653c

Browse files
committed
Load the current libraries
1 parent e3543c3 commit ab7653c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/io/console/test_io_console.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
end
88

99
class TestIO_Console < Test::Unit::TestCase
10+
PATHS = $LOADED_FEATURES.grep(%r"/io/console(?:\.#{RbConfig::CONFIG['DLEXT']}|/\w+\.rb)\z") {$`}
11+
1012
# FreeBSD seems to hang on TTOU when running parallel tests
1113
# tested on FreeBSD 11.x
1214
def set_winsize_setup
@@ -326,7 +328,7 @@ def helper
326328
end
327329

328330
def run_pty(src, n = 1)
329-
r, w, pid = PTY.spawn(EnvUtil.rubybin, "-rio/console", "-e", src)
331+
r, w, pid = PTY.spawn(EnvUtil.rubybin, "-I#{TestIO_Console::PATHS.join(File::PATH_SEPARATOR)}", "-rio/console", "-e", src)
330332
rescue RuntimeError
331333
skip $!
332334
else

0 commit comments

Comments
 (0)