# Ruby change

**URL:** <https://www.ruby-forum.com/t/ruby-change/165838>\
**Category:** Rails\
**Created:** [April 18, 2009, 1:18am UTC](https://www.ruby-forum.com/t/ruby-change/165838 "2009-04-18T01:18:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ricklach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@ricklach](https://www.ruby-forum.com/u/ricklach)\
**Post date:** [April 18, 2009, 1:18am UTC](https://www.ruby-forum.com/t/ruby-change/165838/1 "2009-04-18T01:18:59Z")

</div>

I’ve been running into this problem with gems and plugins recently  
when using ruby 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?

This is the question I asked the Ruby language group (redmine.ruby-  
[lang.org](http://lang.org) Bug #1389) which produced this response:

It was an “accidental” feature in the first place. It’s been removed  
to simplify the new hash literal syntax.

At this point, I’ve found problems with rubyist-aasm and attachment-  
fu. No extensive search here just trying the plugins/gems I’ve used.

So, if you’re trying to work with ruby 1.9 and you’re seeing error  
messages that look like:

attachment\_fu.rb:106: syntax error, unexpected tIDENTIFIER, expecting  
keyword\_then or ‘,’ or ‘;’ or ‘\n’

search out the ‘:’ and replace it with ‘then’
