Skip to content

Commit

Permalink
[ruby/open3] Only use JITSupport on CRuby
Browse files Browse the repository at this point in the history
  • Loading branch information
headius authored and hsbt committed Dec 9, 2021
1 parent d150b8d commit 34ebd13
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/test_open3.rb
Expand Up @@ -2,7 +2,10 @@

require 'test/unit'
require 'open3'
require_relative 'lib/jit_support'

if RUBY_ENGINE == 'ruby'
require_relative 'lib/jit_support'
end

class TestOpen3 < Test::Unit::TestCase
RUBY = EnvUtil.rubybin
Expand Down Expand Up @@ -127,7 +130,11 @@ def test_popen2
i.close
STDERR.reopen(old)
assert_equal("zo", o.read)
assert_equal("ze", JITSupport.remove_mjit_logs(r.read))
if defined?(JITSupport)
assert_equal("ze", JITSupport.remove_mjit_logs(r.read))
else
assert_equal("ze", r.read)
end
}
}
}
Expand Down

0 comments on commit 34ebd13

Please sign in to comment.