File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/npm-packages/ruby-wasm-wasi/src Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -335,8 +335,10 @@ export class RubyVM {
335335 this . eval ( `
336336 # Require Bundler standalone setup
337337 if File.exist?("/bundle/bundler/setup.rb")
338- # Ruby can expose Gem before rubygems.rb finishes setting up its API.
339- # Load RubyGems explicitly so Bundler standalone does not see a partial Gem module.
338+ # Some ruby-head + ruby.wasm revisions return from rubyInit with a partial
339+ # Gem module: Gem is defined, but RubyGems is not loaded yet and its API
340+ # helpers are still missing. Bundler standalone treats defined?(Gem) as
341+ # sufficient, so load RubyGems explicitly before requiring its setup file.
340342 require "rubygems" if defined?(Gem) && !Gem.respond_to?(:ruby_api_version)
341343 require "/bundle/bundler/setup.rb"
342344 elsif File.exist?("/bundle/setup.rb")
You can’t perform that action at this time.
0 commit comments