Issue #6478 has been updated by trans (Thomas Sawyer).


That was just one example. Here, you can look at this for more cases:

  https://github.com/rubyworks/ostruct2/blob/master/lib/ostruct2.rb

Just ctrl-f for __class__.

But what's this about "mix"? What Ruby are you running!? This is interesting, b/c I was thinking that I could use `#respond_to?` and I don't see anyway to add it to my BasicObject subclass except the "nasty" approach you demonstrated earlier.

----------------------------------------
Feature #6478: BasicObject#__class__
https://bugs.ruby-lang.org/issues/6478#change-26795

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/