Project

General

Profile

Actions

Feature #6224

closed

Make variables in if/unless conditions available to conditional statements

Added by gcao (Guoliang Cao) over 12 years ago. Updated over 12 years ago.

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

Description

I propose to make below code work

do_something(a) if a = condition

Above code should work exactly same as

if a = condition
do_something(a)
end

If there is a reason behind why the first case does not work, please let me know.

Thank you.
Guoliang Cao


Related issues 2 (0 open2 closed)

Is duplicate of Ruby master - Feature #1141: assignment of variable in "right" if statement failsRejected02/11/2009Actions
Is duplicate of Ruby master - Feature #4965: The problem of "print line if line = DATA.gets"Rejectedmatz (Yukihiro Matsumoto)07/03/2011Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0