summaryrefslogtreecommitdiff
path: root/marshal.rb
blob: b8b5ce9e82e258adb5004ddd23123dc760ee61e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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