summaryrefslogtreecommitdiff
path: root/jit_hook.rb
diff options
context:
space:
mode:
authorMax Bernstein <ruby@bernsteinbear.com>2026-02-06 17:45:58 -0500
committerMax Bernstein <tekknolagi@gmail.com>2026-02-09 19:28:04 -0500
commit98e6f5e4bc56b8b611d152a43500531478a6472d (patch)
treea2f95a31b6bab2d74d531aa620d3b0c0d77fe966 /jit_hook.rb
parentf96f84837d5dfedaee9758141fd2006ffb03e96d (diff)
Enable ZJIT jit hooks for with_jit builtins
Diffstat (limited to 'jit_hook.rb')
-rw-r--r--jit_hook.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/jit_hook.rb b/jit_hook.rb
index 346b716948..c605d6e26d 100644
--- a/jit_hook.rb
+++ b/jit_hook.rb
@@ -2,10 +2,10 @@ class Module
# Internal helper for built-in initializations to define methods only when JIT is enabled.
# This method is removed in jit_undef.rb.
private def with_jit(&block) # :nodoc:
- # ZJIT currently doesn't compile Array#each properly, so it's disabled for now.
- if defined?(RubyVM::ZJIT) && false # TODO: remove `&& false` (Shopify/ruby#667)
+ if defined?(RubyVM::ZJIT)
RubyVM::ZJIT.send(:add_jit_hook, block)
- elsif defined?(RubyVM::YJIT)
+ end
+ if defined?(RubyVM::YJIT)
RubyVM::YJIT.send(:add_jit_hook, block)
end
end