Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Delegator#marshal_dump
() -> untyped
marshal_dump
lib/delegate.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/delegate.rb, line 204
def marshal_dump
ivars = instance_variables.reject {|var| /\A@delegate_/ =~ var}
[
:__v2__,
ivars, ivars.map {|var| instance_variable_get(var)},
__getobj__
]
end
Serialization support for the object returned by __getobj__.
See also
#__getobj__
#marshal_load
#freeze
#method_missing
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0