Project

General

Profile

Actions

Bug #11470

closed

extra parens required for if/unless/rescue modifier expressions in single arg method invocations

Added by bughit (bug hit) over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

foo(1 if true) is not allowed requiring foo((1 if true))

also foo(1 unless true) foo(bar rescue 1)

Actions #1

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Status changed from Open to Rejected

It's a spec.

Actions #2

Updated by bughit (bug hit) over 8 years ago

Nobuyoshi Nakada wrote:

It's a spec.

What code would break if foo(1 if true) were valid?

None I would think so why not have it work, there is no ambiguity?

Actions

Also available in: Atom PDF

Like0
Like0Like0