Ruby Ruby 2.2.0 Released

rocLv · 2014年12月26日 · 最后由 chareice 回复于 2014年12月26日 · 2524 次阅读

We are pleased to announce the release of Ruby 2.2.0.

Ruby 2.2 includes many new features and improvements for the increasingly diverse and expanding demands for Ruby.

For example, Ruby’s Garbage Collector is now able to collect Symbol type objects. This reduces memory usage of Symbols; because GC was previously unable to collect them before 2.2. Since Rails 5.0 will require Symbol GC, it will support only Ruby 2.2 or later. (See Rails 4.2 release post for details.)

Also, a reduced pause time thanks to the new Incremental Garbage Collector will be helpful for running Rails applications. Recent developments mentioned on the Rails blog suggest that Rails 5.0 will take advantage of Incremental GC as well as Symbol GC.

Another feature related to memory management is an additional option for configure.in to use jemalloc Feature #9113. This feature is still experimental and currently disabled by default until we gather performance data and more use cases. When we are convinced of the benefits, this feature will be enabled by default.

Experimental support for using vfork(2) with system() and spawn() have also been added. You can read more detail on tanaka-san’s blog in Japanese. This could potentially bring huge speed-up when a large process executes external commands many times. However vfork(2) is still not well understood and a potentially harmful system call. We would like to experiment to find out how much benefit can be gained by gathering performance data and use cases.

Try and enjoy programming with Ruby 2.2.0, and report us your findings!

Notable Changes since 2.1

  • Incremental GC (YARV Maniacs No.12)
  • Symbol GC (presentation at RubyKaigi 2014)
  • configure –with-jemalloc Feature #9113
  • core libraries:
  • Support Unicode 7.0 #9092

New methods:

  • Enumerable#slice_after #9071, Enumerable#slice_when #9826
  • Float#next_float, Float#prev_float #9834
  • File.birthtime, File#birthtime #9647
  • String#unicode_normalize #10084

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

See NEWS in Ruby repository for details.

With those changes, 1557 files changed, 125039 insertions(+), 74376 deletions(-) from v2.1.0!

共收到 3 条回复

等测评,哈

  • Update RubyGems 2.4.5

这个版本有 BUG 啊

god 启动失败。。

[root@localhost god]# god -c shadowsock -D
ruby /usr/local/rvm/gems/ruby-2.2.0/bin/god -c shadowsock -D: symbol lookup error: /usr/local/rvm/gems/ruby-2.2.0/gems/god-0.13.4/ext/god/netlink_handler_ext.so: undefined symbol: rb_thread_select

切换回 2.1.2 正常

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册