Skip to content

Commit a3ed34a

Browse files
committed
Update comments to provide more specific context
1 parent dda4562 commit a3ed34a

File tree

1 file changed

+4
-2
lines changed
  • packages/npm-packages/ruby-wasm-wasi/src

1 file changed

+4
-2
lines changed

packages/npm-packages/ruby-wasm-wasi/src/vm.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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")

0 commit comments

Comments
 (0)