Take the 2-minute tour ×

According to http://redmine.ruby-lang.org/issues/1183 , Ruby 1.9's {foo: 42} apparently was back-ported to Ruby 1.8. But I tried running ruby-1.8.7-head using RVM, and I got the standard syntax error:

Andrew-Grimms-MacBook-Pro:ruby agrimm$ rvm use ruby-1.8.7-head
Using /Users/agrimm/.rvm/gems/ruby-1.8.7-head
Andrew-Grimms-MacBook-Pro:ruby agrimm$ irb
ruby-1.8.7-head :001 > {a: "foo"}
SyntaxError: compile error
(irb):1: odd number list for Hash
{a: "foo"}
(irb):1: syntax error, unexpected ':', expecting '}'
{a: "foo"}
    from (irb):1

Has the change been reverted, or are not all changes to the source code reflected in ruby-1.8.7-head?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Check the version number: this patch was applied to Ruby 1.8.8, not 1.8.7. Which ruby-core agreed just 4 days ago will never be released. As of last week, 1.8 is officially dead.

1.8.8 was the mythical transitional version that would correctly parse but not execute Ruby 1.9 syntax, so that you could write stuff like

if RUBY_VERSION > '1.8'
  ->x { x }
  lambda {|x| x }

However, it turned out that everybody who wanted to migrate to Ruby 1.9 was already doing so, and the people that didn't want to migrate would not have been swayed by 1.8.8, so it simply didn't make sense to divert any more resources to it.

share|improve this answer
I saw your tweet this afternoon - that's what made me think about this. So this change would have happened to the ruby_1_8 branch of the git repo, whereas RVM's ruby-1.8.7-head uses the ruby_1_8_7 branch? –  Andrew Grimm Apr 11 '11 at 12:52
"As of last week, 1.8 is officially dead.". Sniff... sniff... –  the Tin Man Apr 11 '11 at 21:33
@the Tin Man: that was a bit hyperbolic. 1.8.7 is going to be maintained for a long time to come; heck, 1.8.6 is still being maintained. But there will not be another 1.8 release. –  Jörg W Mittag Apr 12 '11 at 1:47
Actually, that's what I read the other day too. Matz was mulling over the idea of a 1.8.8, but if 1.8.7 is getting bug fixes I don't see much need for 1.8.8. 1.8.7 was a good improvement over previous revs and seems quite solid, so I use it for backwards compatibility. –  the Tin Man Apr 12 '11 at 1:56
add comment

Your Answer


