[ruby-core:74401] [Ruby trunk Feature#12094] parameterized property assignment: o.prop(arg) = 1

From: shyouhei@...
Date: 2016-03-17 07:05:03 UTC
List: ruby-core #74401
Issue #12094 has been updated by Shyouhei Urabe.


I met nobu so I asked its status.  He told me that this proposed syntax conflicted catastrophically with existing grammars when he tried this last time.

He said he'll try again.

----------------------------------------
Feature #12094: parameterized property assignment: o.prop(arg) = 1
https://bugs.ruby-lang.org/issues/12094#change-57525

* Author: bug hit
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
```ruby
module Mod

  @foo = {}

  def self.foo(k)
    @foo[k]
  end

  def self.foo=(k, v)
    @foo[k] = v
  end

end

Mod1.foo(:key1) ||= 'val1'
```



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

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next