Project

General

Profile

Feature #12094

parameterized property assignment: o.prop(arg) = 1

Added by bughit (bug hit) over 1 year ago. Updated over 1 year ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:73903]

Description

module Mod

  @foo = {}

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

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

end

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

History

#1 [ruby-core:73907] Updated by nobu (Nobuyoshi Nakada) over 1 year ago

This is a longstanding pending feature.

#2 [ruby-core:73923] Updated by bughit (bug hit) over 1 year ago

  • Subject changed from parameterized property assignment: o.prop(arg) = 1) to parameterized property assignment: o.prop(arg) = 1

Nobuyoshi Nakada wrote:

This is a longstanding pending feature.

What is its status? Is there an existing issue for it?

#3 [ruby-core:74401] Updated by shyouhei (Shyouhei Urabe) over 1 year ago

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.

Also available in: Atom PDF