Issue #8041 has been reported by marcandre (Marc-Andre Lafortune).

----------------------------------------
Bug #8041: Marshal incompatibility with prepend
https://bugs.ruby-lang.org/issues/8041

Author: marcandre (Marc-Andre Lafortune)
Status: Open
Priority: Low
Assignee: 
Category: core
Target version: current: 2.1.0
ruby -v: r39629


Marshal doesn't work for objects with prepended modules:

    o = Object.new
    o.singleton_class.send :include, Enumerable
    Marshal.load(Marshal.dump(o)) # => ok

    o = Object.new
    o.singleton_class.send :prepend, Enumerable
    Marshal.load(Marshal.dump(o)) # => ArgumentError: Object does not refer to module



-- 
http://bugs.ruby-lang.org/