Ruby 2.0.0 is out & production-ready
Posted: Sun Feb 24, 2013 8:42 pm
http://www.ruby-lang.org/en/news/2013/0 ... -released/
Some of the highlights:
Language core features
Keyword arguments, which give flexibility to API design
Module#prepend, which is a new way to extend a class
A literal %i, which creates an array of symbols easily
__dir__, which returns the dirname of the file currently being executed
The UTF-8 default encoding, which make many magic comments omissible
Built-in libraries
Enumerable#lazy and Enumerator::Lazy, for (possibly infinite) lazy stream
Enumerator#size and Range#size, for lazy size evaluation
#to_h, which is a new convention for conversion to Hash
Onigmo, which is a new regexp engine (a fork of Oniguruma)
Asynchronous exception handling API
Debug support
DTrace support, which enables run-time diagnosis in production
TracePoint, which is an improved tracing API
Performance improvements
GC optimization by bitmap marking
Kernel#require optimization which makes Rails startup very fast
VM optimization such as method dispatch
Float operation optimization
...notable incompatibilities we know of:
The default encoding for ruby scripts is now UTF-8 [#6679]. Some people report that it affects existing programs, such as some benchmark programs becoming very slow [ruby-dev:46547].