[ruby-core:124735] [Ruby Feature#6478] BasicObject#__class__
Issue #6478 has been updated by byroot (Jean Boussier). Not that I'm for nor against this feature request, but:
In terms of naming I think __class__ looks like a hack that Python would use and not Ruby-like.
I mean, it's consistent with `__send__` and `__id__`, aliases of `send` and `object_id` meant to be used by generic code that want to ensure it can deal with any object, even ones that would redefine common methods.
Why not add BasicObject#class?
I suspect that would break various proxy classes in gems. Might not be a huge deal. ---------------------------------------- Feature #6478: BasicObject#__class__ https://bugs.ruby-lang.org/issues/6478#change-116336 * Author: trans (Thomas Sawyer) * Status: Feedback * Assignee: matz (Yukihiro Matsumoto) ---------------------------------------- How else is one supposed to get the class of a subclass of BasicObject? -- https://bugs.ruby-lang.org/
participants (1)
-
byroot (Jean Boussier)