# ruby change

**URL:** <https://discuss.rubyonrails.org/t/ruby-change/41686>\
**Category:** rubyonrails-talk\
**Created:** [April 17, 2009, 11:18pm UTC](https://discuss.rubyonrails.org/t/ruby-change/41686 "2009-04-17T23:18:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick3](https://avatars.discourse-cdn.com/v4/letter/r/ecb155/32.png) [@Rick3](https://discuss.rubyonrails.org/u/Rick3)\
**Post date:** [April 17, 2009, 11:18pm UTC](https://discuss.rubyonrails.org/t/ruby-change/41686/1 "2009-04-17T23:18:16Z")

</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 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'
