[#23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>

Dear Ruby developers and users!

8 messages 2009/04/17

[#23318] [Feature #1408] 0.1.to_r not equal to (1/10) — Heesob Park <redmine@...>

Feature #1408: 0.1.to_r not equal to (1/10)

19 messages 2009/04/26

[ruby-core:23242] [Bug #1389] Use of ":" as synonym for "do" and "then"

From: Rick Lloyd <redmine@...>
Date: 2009-04-17 20:50:35 UTC
List: ruby-core #23242
Bug #1389: Use of ":" as synonym for "do" and "then"
http://redmine.ruby-lang.org/issues/show/1389

Author: Rick Lloyd
Status: Open, Priority: Normal
ruby -v: 1.9.1p0

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?


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next