Project

General

Profile

Actions

Feature #18408

closed

Allow pattern match to set instance variables

Added by Dan0042 (Daniel DeLorme) over 2 years ago. Updated over 1 year ago.

Status:
Rejected
Target version:
-
[ruby-core:106644]

Description

I expected this to work:

42 => @v

But instead it raises "syntax error, unexpected instance variable"

Is this intentional?


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #16372: Allow pattern matching to bind instance variablesRejectedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0