module Gem::SafeMarshal
Dieses Modul wird zum sicheren Laden von Marshal-Spezifikationen aus einem Gem verwendet. Die auf diesem Modul definierte Methode `safe_load` ist speziell für das Laden von Gem-Spezifikationen konzipiert.
Constants
- PERMITTED_CLASSES
- PERMITTED_IVARS
- PERMITTED_SYMBOLS
Öffentliche Klassenmethoden
Source
# File 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
Source
# File 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