Issue #6028 has been reported by Marc-Andre Lafortune.

----------------------------------------
Bug #6028: OpenStruct.dup doesn't have all its methods
https://bugs.ruby-lang.org/issues/6028

Author: Marc-Andre Lafortune
Status: Open
Priority: Normal
Assignee: Marc-Andre Lafortune
Category: lib
Target version: 1.9.3
ruby -v: r34609


Dupped OpenStructs don't have the same methods.

    x = OpenStuct.new(foo: 42)
    x.dup.methods == x.methods # => false
    x.respond_to?(:foo) # => true
    x.dup.respond_to?(:foo) # => false



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