Project

General

Profile

Actions

Feature #10183

open

An alternative name for method `class`

Added by sawa (Tsuyoshi Sawada) about 10 years ago. Updated about 7 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:64652]

Description

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

self.class

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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0