Skip to content

Commit

Permalink
Only use JITSupport on CRuby
Browse files Browse the repository at this point in the history
Fixes #2
  • Loading branch information
headius committed Sep 29, 2021
1 parent f83fcee commit 6b7ede6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/test_open3.rb
Original file line number Diff line number Diff line change
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 6b7ede6

Please sign in to comment.