Project

General

Profile

Actions

Bug #19881

closed

Unary operators on calls without parentheses

Added by kddnewton (Kevin Newton) 8 months ago. Updated 8 months ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:114759]

Description

At the moment it appears that you can't use unary operators when you have a call without parentheses. For example:

- foo 1, 2, 3

This seems useful, particularly for methods that perform calculations.

I'm also asking because I thought this was allowed, so YARP allows it. If it's not, I need to explicitly add a syntax error for it.

Actions

Also available in: Atom PDF

Like0
Like0Like0