Issue #7055 has been updated by Eregon (Benoit Daloze).


alexeymuranov (Alexey Muranov) wrote:
> [...] it does not just use the previous statement value as the receiver, it in fact continues the previous line, which can also be done by leaving the dot on the previous line.

Yes, indeed, my wording was badly chosen.

alexeymuranov (Alexey Muranov) wrote:
> I am still interested in other opinions.

I think a nicer syntax for setters would be worth adding, but it definitely can't be ".setter =".
----------------------------------------
Feature #7055: Allow `.foo=` as a synonym of `self.foo=`
https://bugs.ruby-lang.org/issues/7055#change-29686

Author: alexeymuranov (Alexey Muranov)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 


=begin
I propose to make the use of `self` in method calls optional:

  .foo = 'bar'

instead of

  self.foo = 'bar'

This only matters of course for assignment methods, to distinguish a method call from creating or setting a local variable.
=end



-- 
http://bugs.ruby-lang.org/