class Ruby::Box - Documentation for Ruby 4.1
30-Dec-2025 560
Ruby Box is designed to provide separated spaces in a Ruby process, to isolate application codes, libraries and monkey patches.
Known issues
Experimental warning is shown when ruby starts with RUBY_BOX=1 (specify -W:no-experimental option to hide it)
Installing native extensions may fail under RUBY_BOX=1 because of stack level too deep in extconf.rb
require 'active_support/core_ext' may fail under RUBY_BOX=1
Defined methods in a box may not be referred by built-in methods written in Ruby
TODOs
Add the loaded box on iseq to check if another box tries running the iseq (add a field only when VM_CHECK_MODE?)
Assign its own TOPLEVEL_BINDING in boxes
Fix calling warn in boxes to refer $VERBOSE and Warning.warn in the box
Make an internal data container class Ruby::Box::Entry invisible
More test cases about $LOAD_PATH and $LOADED_FEATURES.
class Ruby::Box - Documentation for Ruby 4.1 #ruby #rubydeveloper #rubyonrails #class #Ruby::Box #Documentation #class https://rubyonrails.ba/link/class-ruby-box-documentation-for-ruby-4-1