From: "marcandre (Marc-Andre Lafortune)" Date: 2013-03-08T09:47:46+09:00 Subject: [ruby-core:53206] [ruby-trunk - Bug #8043][Open] Marshal will dump some object with singleton methods Issue #8043 has been reported by marcandre (Marc-Andre Lafortune). ---------------------------------------- Bug #8043: Marshal will dump some object with singleton methods https://bugs.ruby-lang.org/issues/8043 Author: marcandre (Marc-Andre Lafortune) Status: Open Priority: Normal Assignee: Category: core Target version: current: 2.1.0 ruby -v: r39608 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 -- http://bugs.ruby-lang.org/