Project

General

Profile

Bug #21806

Updated by sinsoku (Takumi Shotoku) about 7 hours ago

## Steps to reproduce 

 1. Prepare a file that uses "bundler/inline" 
 2. Run with RUBY_BOX=1 

 ```ruby 
 # issue.rb 
 require "bundler/inline" 

 gemfile(true) do 
   source "https://rubygems.org" 
   gem "json" 
 end 

 require "json" 
 puts JSON::VERSION 
 ``` 

 ## Expected behavior 

 It should run without error. 

 ## Actual behavior 

 `uninitialized constant Gem::NameTuple` occurs. 

 ```bash 
 $ RUBY_BOX=1 ruby issue.rb 
 ruby: warning: Ruby::Box is experimental, and the behavior may change in the future! 
 See https://docs.ruby-lang.org/en/4.0/Ruby/Box.html for known issues, etc. 
 Fetching gem metadata from https://rubygems.org/. 
 Retrying fetcher due to error (2/4): NameError uninitialized constant Gem::NameTuple 
 . 
 Retrying fetcher due to error (3/4): NameError uninitialized constant Gem::NameTuple 
 . 
 Retrying fetcher due to error (4/4): NameError uninitialized constant Gem::NameTuple 
 . 
 /Users/sinsoku/.local/share/mise/installs/ruby/4.0.0/lib/ruby/4.0.0/rubygems/specification.rb:2087:in 'Gem::Specification#name_tuple': uninitialized constant Gem::NameTuple (NameError) 

     Gem::NameTuple.new name, version, original_platform 
        ^^^^^^^^^^^ 
         from /Users/sinsoku/.local/share/mise/installs/ruby/4.0.0/lib/ruby/4.0.0/bundler/rubygems_ext.rb:277:in 'Gem::Specification#lock_name' 
         from /Users/sinsoku/.local/share/mise/installs/ruby/4.0.0/lib/ruby/4.0.0/bundler/checksum.rb:193:in 'Bundler::Checksum::Store#replace' 
         from /Users/sinsoku/.local/share/mise/installs/ruby/4.0.0/lib/ruby/4.0.0/bundler/fetcher.rb:182:in 'block (2 levels) in Bundler::Fetcher#specs' 
 ``` 

Back