Project

General

Profile

Actions

Backport #8043

closed

Marshal will dump some object with singleton methods

Added by marcandre (Marc-Andre Lafortune) about 11 years ago. Updated almost 11 years ago.


Description

=begin
The check for "dumpability" is incorrect:

o = Object.new
def o.foo; end
Marshal.dump(o) # => TypeError: singleton can't be dumped
o.singleton_class.send :prepend, Enumerable
Marshal.dump(o) # => "\x04\be:\x0FEnumerablee:\vObjecto;\x06\0", should fail

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0