From 8f2821d0819ee7c08506f204c7676f12c5ab1397 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@ruby-lang.org>
Date: Tue, 23 Mar 2021 21:27:54 +0900
Subject: [PATCH] Guard for RubyVM::JIT

---
 test/test_sync.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test_sync.rb b/test/test_sync.rb
index e3294ff..9229c14 100644
--- a/test/test_sync.rb
+++ b/test/test_sync.rb
@@ -59,7 +59,7 @@ def test_sync_lock_and_raise
     }
 
     sleep 0.1 until t.stop?
-    sleep 1 if RubyVM::MJIT.enabled? # t.stop? behaves unexpectedly with --jit-wait
+    sleep 1 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # t.stop? behaves unexpectedly with --jit-wait
     t.raise
     t.join
 
