summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2025-02-12 19:39:31 +0900
committerHiroshi SHIBATA <[email protected]>2025-02-13 07:51:28 +0900
commit0e34a883bc75f6d3924e8369c355281927179da9 (patch)
treee9e68dea917dd7f1696b93ddcb1123d074ab9232
parent207c6750eff8c18832177a4953ed3a6206a3c6da (diff)
Fixed infinite loop with GitHub Actions
Co-authored-by: Nobuyoshi Nakada <[email protected]>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12737
-rw-r--r--rjit.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/rjit.rb b/rjit.rb
index d8b77fab90..d2e6ce549e 100644
--- a/rjit.rb
+++ b/rjit.rb
@@ -27,13 +27,15 @@ module RubyVM::RJIT
end
if RubyVM::RJIT.enabled?
+ fiddle_paths = nil
begin
require 'fiddle'
require 'fiddle/import'
rescue LoadError
+ return if fiddle_paths
# Find fiddle from artifacts of bundled gems for make test-all
- fiddle_paths = %w[.bundle/gems/fiddle-*/lib .bundle/extensions/*/*/fiddle-*].map do |dir|
- Dir.glob("#{File.expand_path("..", __FILE__)}/#{dir}").first
+ fiddle_paths = %W[#{__dir__}/.bundle/gems/fiddle-*/lib .bundle/extensions/*/*/fiddle-*].map do |dir|
+ Dir.glob(dir).first
end.compact
if fiddle_paths.empty?
return # miniruby doesn't support RJIT