Project

General

Profile

Actions

Feature #841

closed

Object#self

Added by rubikitch (rubikitch .) about 16 years ago. Updated about 8 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-dev:37337]

Description

=begin
自分自身を返すメソッドがあってもいいんじゃないでしょうか?
名前はRuby的にはself、Lispに倣うならばidentityとか。

class Object
def self; self end
end

1.self # => 1
"a".self # => "a"
=end


Files

tap-without-block.patch (727 Bytes) tap-without-block.patch no6v (Nobuhiro IMAI), 12/11/2008 08:05 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0