diff options
author | Benoit Daloze <[email protected]> | 2020-12-04 16:40:02 +0100 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2020-12-04 16:45:54 +0100 |
commit | b4ec4a41c24105efbb43f9b70ca7f36d22f98294 (patch) | |
tree | 6e257f60ef031d6ea815123c0ce0ed85e10a66be /test/socket | |
parent | 83e983ab61b532d17a1177c66e3e43a5042edc1f (diff) |
Guard all accesses to RubyVM::MJIT with defined?(RubyVM::MJIT) &&
* Otherwise those tests, etc cannot run on alternative Ruby implementations.
Diffstat (limited to 'test/socket')
-rw-r--r-- | test/socket/test_socket.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb index 04d677c747..96304b0e54 100644 --- a/test/socket/test_socket.rb +++ b/test/socket/test_socket.rb @@ -485,7 +485,7 @@ class TestSocket < Test::Unit::TestCase end while IO.select([r], nil, nil, 0.1).nil? n end - timeout = (RubyVM::MJIT.enabled? ? 120 : 30) # for --jit-wait + timeout = (defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? ? 120 : 30) # for --jit-wait assert_equal([[s1],[],[]], IO.select([s1], nil, nil, timeout)) msg, _, _, stamp = s1.recvmsg assert_equal("a", msg) |