For issues relating to development in Ruby, version 2.0. If your question applies to Ruby in general, use the tag [ruby].
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. Ruby 2.0 was released Feb 24, 2013.
For information on Ruby in general, visit ruby. And API documentation for Ruby 2.0.0.
The official release 2.0 announcement summarizes the changes as:
- 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
In addition, albeit as an experimental feature, 2.0.0 includes Refinements, which adds a new concept to Ruby's modularity.