From: "nobu (Nobuyoshi Nakada)" Date: 2013-03-08T18:39:18+09:00 Subject: [ruby-core:53228] [ruby-trunk - Bug #8043] Marshal will dump some object with singleton methods Issue #8043 has been updated by nobu (Nobuyoshi Nakada). Description updated But extended objects are allowed, aren't they? ---------------------------------------- Bug #8043: Marshal will dump some object with singleton methods https://bugs.ruby-lang.org/issues/8043#change-37388 Author: marcandre (Marc-Andre Lafortune) Status: Open Priority: Normal Assignee: Category: core Target version: current: 2.1.0 ruby -v: r39608 =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 -- http://bugs.ruby-lang.org/