ActionsLike0
Feature #8563
closedInstance variable arguments
Description
Often times, people want to assign given arguments to instance variables, especially inside the method initialize
:
def initialize foo, bar, buz
@foo, @bar, @buz = foo, bar, buz
...
end
I propose to let method definition take instance variables as arguments so that:
def initialize @foo, @bar, @buz
...
end
would be equivalent as above.
Updated by nobu (Nobuyoshi Nakada) almost 12 years ago
- Category set to syntax
- Status changed from Open to Assigned
- Assignee set to matz (Yukihiro Matsumoto)
- Target version set to 3.0
Updated by nobu (Nobuyoshi Nakada) about 9 years ago
- Description updated (diff)
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
- Has duplicate Feature #12578: Instance Variables Assigned In parameters ( ala Crystal? ) added
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
- Has duplicate Feature #12820: Shorter syntax for assigning a method argument to an instance variable added
Updated by matz (Yukihiro Matsumoto) over 7 years ago
- Status changed from Assigned to Rejected
ActionsLike0