![]() |
Ruby 3.2.0 Released— It’s here! As is the tradition, the latest release of Ruby arrived on Christmas Day (but we took a couple of weeks off). 3.2 is from another dimension, allegedly, and packed with lots of cool stuff:
- The
Data class is a new core class for representing simple immutable value objects. It was originally proposed by Victor Shepelev who has written about its design here. - YJIT is no longer experimental and, as we'll see later, yields a nice performance boost in numerous scenarios.
- An initial level of WASI-based WebAssembly support. Ruby running on WASM-based serverless platforms? Yes. Running in the browser? Yes. Expect to see more of this in 2023.
- As part of the WASM support, there's a VFS built on top of WASI so apps can be packed into a single
.wasm file. - Extra protections against inefficient regexes, including
Regexp.timeout - Improved error highlighting and suggestions.
- Anonymous rest and keyword rest arguments can be passed as arguments.
- The find pattern is no longer experimental.
Yui Naruse |
![]() Rails Upgrades You Can Depend On— Upgrade Ruby & Rails confidently, without disrupting ongoing feature development or production operations. Have you ever wondered how Big Rails™ companies like Shopify or GitHub upgrade major versions with zero downtime? Click here to find out how. upgraderails․com sponsor |
QUICK BITS 📅 Want to get some Ruby events on your calendar for 2023? RubyKaigi is in Japan on May 11-13, RailsConf is in Atlanta, GA on April 24-26, and RubyConf AU is in Melbourne, Australia on Feb 15-17. 🎤 Drew Bragg ▶️ has a fun hour-long interview with Ruby internals expert Kevin Newton discussing the new YARP Ruby parser amongst other things. Talking of Kevin Newton, he finished his Advent of YARV series– it's basically a 24 episode tour of the CRuby virtual machine. RailsApps․org was a popular site with Rails starter scripts, install instructions, and more, but it's now 'resting in peace' - here's its obituary. The latest RubyGems (v3.4.0) requires Ruby 2.6+ but now cleans up intermediate files after installing extensions, plus it'll tell you when it's out of date.
|
📕 Tutorials, Articles & Features |
Benchmarking Ruby 2.6 to 3.2— Thomas runs his annual Ruby benchmarks using HexaPDF, Kramdown, and geom2d. The results are encouraging, especially when YJIT is enabled in Ruby’s latest version. Thomas Leitner |
Benchmarking Ruby 3.2 with YJIT— More 3.2 benchmarking, this time using Hanami and some of the dry-rb gems with a somewhat unexpected result that should make you happy about how Ruby’s performance is trending. Peter Solnica |
Be Careful with Time Durations in Rails— ActiveSupport offers some great time and date helpers, like 3.months.from_now , but they can surprise you (in a bad way) if you’re not aware of how they work, so start the new year by handling months correctly. Jonathan Miles (Honeybadger) |
Announcing the Ronin 2.0.0 Open Beta— Ronin, a “toolkit for security research and development” has undergone a “Big Refactor” and is now asking for Rubyists to kick the tires through the month of January. Hal Brodigan |
Opal 1.7 ↳ Ruby to JavaScript transpiler. Faker 3.1 ↳ Library to generate fake data on demand. Xsv 1.2 ↳ Pure Ruby XLSX (Excel) parser.
|
|