Ruby Changelog

What's new in Ruby 2.3.0

Dec 30, 2015
  • A Frozen String Literal Pragma is introduced. With Ruby 2.1, "str".freeze has been optimized to reduce object allocation. Ruby 2.3 introduces a new magic comment and command line option to freeze all string literals in the source files. Additionally for debugging, you can get where the object is created on "can't modify frozen String" error by --debug=frozen-string-literal command line option.
  • A safe navigation operator (so-called lonely operator) &., which already exists in C#, Groovy, and Swift, is introduced to ease nil handling as obj&.foo. Array#dig and Hash#dig are also added. Note that this behaves as try! of Active Support, which specially handle only nil.
  • The did_you_mean gem is bundled. The did_you_mean gem shows the candidates on the NameError and NoMethodError to ease debugging.
  • RubyVM::InstructionSequence#to_binary and .load_from_binary are introduced as experimental feature. With these features, we can make a ISeq (bytecode) pre-compilation system.
  • It also includes many performance improvements for example, reconsider method entry data structure, introducing new table data structure, optimize Proc#call, machine code level tuning for object allocation and method calling code, smarter instance variable data structure, Socket and I/O allow to use “exception:” keywords for high-performance non-blocking I/O and so on.

New in Ruby 2.2.4 (Dec 17, 2015)

  • CVE-2015-7551: Unsafe tainted string usage in Fiddle and DL

New in Ruby 2.2.3 (Aug 18, 2015)

  • This release includes the security fix for a RubyGems domain name verification vulnerability. CVE-2015-3900 Request hijacking vulnerability in RubyGems 2.4.6 and earlier

New in Ruby 2.2.2 (Apr 13, 2015)

  • This release includes the security fix for a OpenSSL extension's hostname verification vulnerability.

New in Ruby 2.2.1 (Mar 6, 2015)

  • This release includes the fix for ffi build failure and memory leak issue on Symbol GC (See Bug #10686).

New in Ruby 2.1.0 (Dec 27, 2013)

  • VM (method cache)
  • RGenGC (See ko1’s RubyKaigi presentation and RubyConf 2013 presentation)
  • refinements #8481 #8571
  • syntax changes:
  • Decimal/Complex Literal #8430
  • def’s return value #3753
  • Bignum:
  • use GMP #8796
  • String#scrub #8414
  • Socket.getifaddrs #8368
  • RDoc 4.1.0 and RubyGems 2.2.0
  • “literal”.freeze is now optimized #9042
  • add Exception#cause #8257
  • update libraries like BigDecimal, JSON, NKF, Rake, RubyGems, and RDoc
  • remove curses #8584

New in Ruby 2.0.0-p0 (Feb 25, 2013)

  • 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

New in Ruby 1.9.3-p392 (Feb 22, 2013)

  • This release includes security fixes about bundled JSON and REXML:
  • Denial of Service and Unsafe Object Creation Vulnerability in JSON (CVE-2013-0269)
  • Entity expansion DoS vulnerability in REXML (XML bomb)
  • And some small bugfixes are also included.

New in Ruby 1.9.3-p385 (Feb 7, 2013)

  • This release includes a security fix about bundled RDoc.

New in Ruby 1.9.3-p384 (Feb 6, 2013)

  • This release includes a security fix about bundled RDoc.

New in Ruby 1.9.3-p286 (Oct 12, 2012)

  • $SAFE escaping vulnerability about Exception#to_s / NameError#to_s (CVE-2012-4464, CVE-2012-4466)
  • Unintentional file creation caused by inserting a illegal NUL character
  • other many bug fixes.