From: "trans (Thomas Sawyer)" Date: 2012-05-23T14:34:52+09:00 Subject: [ruby-core:45196] [ruby-trunk - Feature #6478] BasicObject#__class__ Issue #6478 has been updated by trans (Thomas Sawyer). =begin To ensure proper functionality when creating new instances from subclasses. class Foo < BasicObject def initialize(stuff) @stuff = stuff end def dup __class__.new(@stuff) end end class Bar < Foo end We can't use (({Foo})) in dup, otherwise Bar would not be right. =end ---------------------------------------- Feature #6478: BasicObject#__class__ https://bugs.ruby-lang.org/issues/6478#change-26779 Author: trans (Thomas Sawyer) Status: Feedback Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: core Target version: 2.0.0 How else is one supposed to get the class of a subclass of BasicObject? -- http://bugs.ruby-lang.org/