From: "matz (Yukihiro Matsumoto)" Date: 2013-06-23T20:34:35+09:00 Subject: [ruby-core:55601] [ruby-trunk - Feature #8563] Instance variable arguments Issue #8563 has been updated by matz (Yukihiro Matsumoto). From my POV: def initialize(@foo, @bar) end does not express intention of instance variable initialization. I'd rather add a method like define_attr_initialize(:foo, :bar) to define a method of def initialize(foo, bar) @foo = foo @bar = bar end Matz. ---------------------------------------- Feature #8563: Instance variable arguments https://bugs.ruby-lang.org/issues/8563#change-40090 Author: sawa (Tsuyoshi Sawada) Status: Assigned Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: syntax Target version: Next Major =begin 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. =end -- http://bugs.ruby-lang.org/