class method
Gem::TargetRbConfig.from_path
from_path(rbconfig_path)
lib/rubygems/target_rbconfig.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/target_rbconfig.rb, line 33
def self.from_path(rbconfig_path)
namespace = Module.new do |m|
# Load the rbconfig.rb file within a new anonymous module to avoid
# conflicts with the rbconfig for the running platform.
Kernel.load rbconfig_path, m
end
rbconfig = namespace.const_get(:RbConfig)
new(rbconfig, rbconfig_path)
end
Creates a TargetRbConfig from the RbConfig file at the given path. Typically used for cross-compiling gems.