diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-02-04 10:59:52 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-02-05 07:36:59 +0900 |
| commit | 9052d0d534828f5b8bd5d94b3863f8afbd617053 (patch) | |
| tree | 78d9b84734c42307bef0fb756a71660cdd8b1908 | |
| parent | b50360e08be5b35ec42b0b97e1d25bc89432023b (diff) | |
Try to inject fiddle path as bundled gems for RJIT
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12616
| -rw-r--r-- | rjit.rb | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 |
