Project

General

Profile

This project is closed and read-only.

Actions

Backport #8043

closed

Marshal will dump some object with singleton methods

Backport #8043: Marshal will dump some object with singleton methods

Added by marcandre (Marc-Andre Lafortune) over 13 years ago. Updated over 13 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: PDF Atom