by ericb · 14y ago · 0 comments
def initialize(foo, bar, baz)
@foo=foo
@bar=bar
@baz=baz
end
Would now be: def initialize(@foo, @bar, @baz)
end
This would save hundreds of lines of code in large programs-- lines which could no longer be a source of typos or errors.Oh, also I'd make binding_of_caller work.
Edit: Never mind, I just tried it and got an error.
Weird. I could have sworn I'd seen it done somewhere.
{@kbar, fu: @bar, blitz: [@first, @rest...]} = someHash
At no extra charge.