Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the main syntax changes in Ruby 1.9?

Also, I'm wondering what effect upgrading to Ruby 1.9 would have on legacy code from version 1.86. Is the new version backwards compatible?

like image 913
Kenneth Johns Avatar asked Feb 03 '09 04:02

Kenneth Johns


1 Answers

Sam Ruby has a good slideshow of the major changes: Ruby 1.9: What to Expect

Just to highlight a few things that could break your code:

  • Single character strings
  • {"a", "b"} no longer makes a hash
  • Block variables now shadow local variables
like image 149
Lolindrath Avatar answered Sep 21 '22 01:09

Lolindrath