Paul Krill
Editor at Large

Ruby completes switch to Prism parser

news
Jan 2, 20252 mins

Ruby 3.4.0, also known as Ruby 3.4.1, arrives on Christmas Day with Prism as the new default parser.

Experiment with red laser using prism in optics lab. Streaming red light and lens against a black background.
Credit: luchschenF / Shutterstock

 Ruby 3.4.0, and Ruby 3.4.1, updates to the longstanding dynamic, open source programming language, have arrived, with Prism now the default parser.

Ruby 3.4.0 was released December 25, Christmas Day, along with an update, Ruby 3.4.1, which merely changed the version number of the release. Ruby 3.4.1 is listed as the current stable version and can be downloaded from ruby-lang.org.

Features cited for the Ruby update include switching the default parser from parse.y to Prism. This serves as an internal improvement, with little change visible to the user, the Ruby development team wrote in a blog post announcing the release. In a change to the language, string literals in files without a frozen_string_literal comment now emit a deprecation warning when mutated. These warnings can be enabled with -W:deprecated or by setting Warning[:deprecated] = true. Also, block passing and keyword arguments are no longer allowed in indexes.

Ruby 3.4.0 and Ruby 3.4.1 follow the November release of Ruby 3.3.6, which brought minor bug fixes and stopped warnings on missing default gem dependencies that will be bundled gems in Ruby 3.5.

In other improvements to Ruby 3.4.0, aka Ruby 3.4.1:

  • Keyword splatting nil when calling methods is now supported.
  • it is introduced to reference a block parameter with no variable name.
  • The socket library now features Happy Eyeballs Version 2 (RFC 8305), the latest standardized version of an approach for better connectivity in many programming languages, in TCPSocket.new (TCPSocket.open) and Socket.tcp. This enables Ruby to provide efficient, reliable network connections, adapted to modern internet environments.
  • The YJIT compiler delivers better performance on most benchmarks on x86-64 and arm64 platforms. Memory usage has been reduced. For the Ruby API, RubyVM::YJIT.log provides access to the tail of the compilation log at run time.
  • Alternative garbage collector implementations can be loaded dynamically through the modular garbage collector feature.

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