Project

General

Profile

Actions

Bug #1389

closed

Use of ":" as synonym for "do" and "then"

Added by rick (Rick Lloyd) about 15 years ago. Updated about 13 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
1.9.1p0
Backport:

Description

=begin
A review of syntax.y from ruby 1.8.7 and 1.9.1 shows the grammar rule for then no longer includes the literal symbol ':'. This change causes commonly used idioms for case expressions and loops to fail. These no longer work:

case
when CONDITION :
BODY
end

while BOOLEAN :
BODY
end

until BOOLEAN :
BODY
end

for NAME in EXPRESSION :
BODY
end

Am I mistaken? Is this a feature?
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0