mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 20:44:20 +00:00
Try to inject fiddle path as bundled gems for RJIT
This commit is contained in:
parent
b50360e08b
commit
9052d0d534
Notes:
git
2025-02-04 22:37:21 +00:00
5
rjit.rb
5
rjit.rb
@ -28,6 +28,11 @@ end
|
||||
|
||||
if RubyVM::RJIT.enabled?
|
||||
begin
|
||||
fiddle_paths = %w[.bundle/gems/fiddle-*/lib .bundle/extensions/*/*/fiddle-*].map do |dir|
|
||||
Dir.glob("#{File.expand_path("..", __FILE__)}/#{dir}").first
|
||||
end.compact
|
||||
$LOAD_PATH.unshift(*fiddle_paths) unless fiddle_paths.empty?
|
||||
|
||||
require 'fiddle'
|
||||
require 'fiddle/import'
|
||||
rescue LoadError
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user