Paul Krill
Editor at Large

The end of BigLittle: Ruby unifies integer classes

news
Jun 24, 20162 mins

Founder Yukihiro Matsumoto says the general release of Ruby 2.4.0 will be available in December

The latest upgrade to Ruby, the popular open source dynamic language, will enhance both performance and simplicity.

A preview of the upgrade, Ruby 2.4.0, was released this week. The general release of is due on Christmas Day, December 25, with a beta release due several months prior to general availability, Ruby founder Yukihiro Matsumoto said.

Preview 1 improves performance by optimizing [x, y].max and .min methods to not create a temporary array under some conditions. The language also gets a performance boost by adding a Regexp#match method, which executes a regexp match without creating a back reference object, leading to reduced object allocation. Regexp holds a regular expression and is used to match patterns against strings. Version 2.4.0 also speeds up instance variable access.

Ruby 2.4.0 promotes simplification through the unification of Fixnum and Bignum integer classes. “In the early stage of Ruby development, I inherited integer class design from Lisp and Smalltalk,” Matsumoto said. “Lisp has Fixnum and Bignum. Smalltalk has SmallInteger and BigInteger. But from 20 years of experience, we found out the distinction according to the integer size is artificial and not essential to the programming.”

To improve debugging, thread deadlock detection is enhanced in the upgrade, according to a bulletin on the release. “Ruby has deadlock detection around waiting threads, but its report doesn’t include enough information for debugging. Ruby 2.4’s deadlock detection shows threads with their backtrace and dependent threads.”

Also in version 2.4.0, the String/Symbol#upcase/downcase/swapcase/capitalize(!) method now supports Unicode case mappings instead of just ASCII mappings. “Unicode was not popular when we added Unicode support to Ruby. So after the discussion with experts — including (XML co-founder) Tim Bray, who was a member of [the] Unicode consortium back then — we decided to make those methods to support ASCII only,” said Matsumoto. “But as years passed, everybody uses Unicode now, especially in the Web field, and we can rely on the case conversion table from Unicode.org. The new case conversion is more natural for programmers using non-ASCII characters.”

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author