End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Marshal.load
load( source [, proc] ) → obj
restore( source [, proc] ) → obj
marshal.c
View on GitHub ↗
static VALUE
marshal_load(int argc, VALUE *argv, VALUE _)
{
VALUE port, proc;
rb_check_arity(argc, 1, 2);
port = argv[0];
proc = argc > 1 ? argv[1] : Qnil;
return rb_marshal_load_with_proc(port, proc);
}
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.