Module
This module is used for safely loading Marshal
specs from a gem. The ‘safe_load` method defined on this module is specifically designed for loading Gem specifications.
Constants
No documentation available
No documentation available
No documentation available
Class Methods
lib/rubygems/safe_marshal.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/lib/rubygems/safe_marshal.rb, line 64
def self.load(input, permitted_classes: [::Symbol], permitted_symbols: [], permitted_ivars: {})
root = Reader.new(StringIO.new(input, "r").binmode).read!
Visitors::ToRuby.new(
permitted_classes: permitted_classes,
permitted_symbols: permitted_symbols,
permitted_ivars: permitted_ivars,
).visit(root)
end
No documentation available
lib/rubygems/safe_marshal.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/lib/rubygems/safe_marshal.rb, line 60
def self.safe_load(input)
load(input, permitted_classes: PERMITTED_CLASSES, permitted_symbols: PERMITTED_SYMBOLS, permitted_ivars: PERMITTED_IVARS)
end
No documentation available