1

Possible Duplicate:
What is the difference between Ruby 1.8 and Ruby 1.9

I have found some differences in interpretation of global and local variables.

Can anyone point me to list of major differences?

Community
  • 1
  • 1
themoah
  • 167
  • 2
  • 13

2 Answers2

3

These are probably the most important changes:

  • Ruby 1.9 changed from being interpreted to being bytecode-compiled (using the YARV VM).

  • The String class has been redesigned entirely to make it encoding-aware.

  • Regular expressions are now implemented using the Oniguruma engine, rather than the home-made one used in ruby 1.8, enabling new features like negative look-around.

  • The enumerator library from stdlib has been added to core and most Enumerable methods have been changed to return an Enumerator when invoked without a block.

  • Symbol#to_proc has been added.

  • There's a new syntax for lambdas, -> which allows default arguments and lambdas taking blocks.

There's a more complete list of changes here.

sepp2k
  • 363,768
  • 54
  • 674
  • 675
1

One major point might be that they use a different VM (at least, the 'standard' distributions do, obviously there are a number of options like MacRuby, IronRuby, etc). You might have a look here for details on all the changes.

philosodad
  • 1,808
  • 14
  • 24