Ruby 2.2.0 Adds Improved Garbage Collector

Ruby 2.2.0 has been released with new features and improvements for the increasingly diverse and expanding demands. With the help of Ruby 2.2.0, Garbage Collector will be able to collect Symbol type objects, which reduces memory usage of Symbols.

Ruby 2.2.0 provides a reduced pause time with the help of new Incremental Garbage Collector. As per Rails blog, Rails 5.0 will leverage Incremental GC as well as Symbol GC.

Ruby 2.2.0

Ruby 2.2.0 includes features related to memory management. There is an additional option for configure.in to use jemalloc Feature. However, this feature has been disabled by default since it is experimental.

The latest version of Ruby implements support for vfork(2) with system() and spawn(). This new feature will bring huge speed-up when a large process executes external commands many times.

Some of the core features included with Ruby 2.2.0 are as follows

Incremental GC
Symbol GC
configure –with-jemalloc
Unicode 7.0 support

New Methods

  • Enumerable#slice_after, Enumerable#slice_when
  • Float#next_float, Float#prev_float
  • File.birthtime, File#birthtime
  • String#unicode_normalize

Bundled Libraries

  •  Update Psych 2.0.8
  •  Update Rake 10.4.2
  •  Update RDoc 4.2.0
  •  Update RubyGems 2.4.5
  •  Update test-unit 3.0.8 (removed from repository but bundled in tarball)
  •  Update minitest 5.4.3 (removed from repository but bundled in tarball)
  •  Deprecate mathn

C API

  •  Remove deprecated APIs

As you can see Ruby 2.2.0 has added improved features which I hope will be very useful for the developer community.

Leave a Comment