Issue #6561 has been updated by yhara (Yutaka HARA).

Target version changed from 2.0.0 to next minor


----------------------------------------
Feature #6561: ?= operator
https://bugs.ruby-lang.org/issues/6561#change-31533

Author: slayer (Vlad Moskovets)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: next minor


I have feature proposition to add new opearator ?= its like ||= but assigns only when variable is not defined
So it should be shortcut for

    @var ?= 1

eq

    defined?(@var) ? @var : @var = 1

It should useful for caching nil'able or false'able items



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