1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/marshal.rb

22 lines
727 B
Ruby
Raw Normal View History

module Marshal
# call-seq:
# load( source [, proc] ) -> obj
# restore( source [, proc] ) -> obj
#
# Returns the result of converting the serialized data in source into a
# Ruby object (possibly with associated subordinate objects). source
# may be either an instance of IO or an object that responds to
# to_str. If proc is specified, each object will be passed to the proc, as the object
# is being deserialized.
#
# Never pass untrusted data (including user supplied input) to this method.
# Please see the overview for further details.
def self.load(source, proc = nil, freeze: false)
Primitive.marshal_load(source, proc, freeze)
end
class << self
alias restore load
end
end