Forum: Ruby-core An alternative name for method `class`

A14d1bca90d7ebeda50dca99aab381b9?d=identicon&s=25 Markus H. (markus_h)
on 2014-08-29 20:34
(Received via mailing list)
Issue #10183 has been updated by Robert A. Heiler.

The problem with object_class is that it is longer than self.class

Remember that object_id used to be called id in the past before that was

Feature #10183: An alternative name for method `class`

* Author: Tsuyoshi Sawada
* Status: Open
* Priority: Normal
* Assignee:
* Category:
* Target version:
The method `class` is special in that it always has to have an explicit
receiver in order to avoid crash with the keyword `class`. But this is
very inconvenient. I have seen so many


in codes. I propose that there should be an alternative name for this
method so that it can be used with an implicit receiver, and the method
name `class` should be gradually depricated.

As for the name, I have no clear idea. I can only think of `klass`, but
perhaps someone else might come up with a better name.
This topic is locked and can not be replied to.