Project

General

Profile

Actions

Feature #12094

open

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

Added by bughit (bug hit) over 5 years ago. Updated over 5 years 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'
Actions

Also available in: Atom PDF