Beginning with Ruby 3.4.0, string literals in files without a frozen_string_literal comment will behave as if they were frozen. Credit: Potapov Alexander / Shutterstock The next version of the Ruby programming language, Ruby 3.4.0, has been released in preview, bringing changes for string literals and class updates. Unveiled May 16, the Ruby 3.4.0 preview is downloadable from ruby-lang.org. With this update, string literals in files without a frozen_string_literal comment now behave as if they were frozen. If mutated, a deprecation warning is emitted. The change marks a first step toward making frozen string literals the default in Ruby. Frozen or immutable strings offer both performance and safety advantages. In other language changes, keyword splatting nil when calling methods now is supported, while block passing and keyword arguments are no longer allowed in indexes. Ruby 3.4.0 also introduces two core class updates. First, Exception#set_backtrace now accepts arrays of Thread::Backtrace::Location, and Kernel#raise, Thread#raise, and Fiber#raise accept this new format as well. Second, Range#size now raises TypeError if the range is not iterable. Error messages and backtrace displays have been changed to address compatibility issues. Developers now can use a single quote instead of a backtick as an opening quote. It is also now allowed to display a class name before a method name when the class has a permanent name. In other improvements, Array#each has been rewritten for better performance. Passing a block to a method that does not use the passed block now will show a warning in verbose mode. And redefining some core methods that are specially optimized by the interpreter and JIT now will emit a performance class warning. Ruby 3.4.0 follows predecessors including last month’s Ruby 3.2.4 release, which brought security fixes, and the Christmas 2023 Ruby 3.3.0 release, which featured the Prism parser. Ruby itself dates back to a 1995 initial public release. Related content feature What is Rust? Safe, fast, and easy software development Unlike most programming languages, Rust doesn't make you choose between speed, safety, and ease of use. Find out how Rust delivers better code with fewer compromises, and a few downsides to consider before learning Rust. By Serdar Yegulalp Nov 20, 2024 11 mins Rust Programming Languages Software Development how-to Kotlin for Java developers: Classes and coroutines Kotlin was designed to bring more flexibility and flow to programming in the JVM. Here's an in-depth look at how Kotlin makes working with classes and objects easier and introduces coroutines to modernize concurrency. By Matthew Tyson Nov 20, 2024 9 mins Java Kotlin Programming Languages analysis Azure AI Foundry tools for changes in AI applications Microsoft’s launch of Azure AI Foundry at Ignite 2024 signals a welcome shift from chatbots to agents and to using AI for business process automation. By Simon Bisson Nov 20, 2024 7 mins Microsoft Azure Generative AI Development Tools news Microsoft unveils imaging APIs for Windows Copilot Runtime Generative AI-backed APIs will allow developers to build image super resolution, image segmentation, object erase, and OCR capabilities into Windows applications. By Paul Krill Nov 19, 2024 2 mins Generative AI APIs Development Libraries and Frameworks Resources Videos