Welcome back to your monthly dose of static typing goodness in the Ruby universe!
You can find all the previous issues of the newsletter in my archive.
I’d really appreciate any feedback that could help improve the newsletter. Feel free to share your thoughts using this form.
Cheers,
August brings a wave of powerful enhancements to the static typing tools—and you’ve got front-row seats. 🎟️
Let’s start with rbs-trace v0.7, crafted by Takumi Shotoku. This gem used to focus solely on laying down traces for Array
, Range
, and Hash
; now, it stretches its reach to generics like never before. It automatically collects argument and return types using TracePoint, outputting those type declarations either as RBS files or inline comments—so your code stays readable and type-rich. 📜
Next up, Rails aficionados: rbs_activesupport v1.7.0 and rbs_actionmailer v1.2.0, both polished by Takeshi Komiya. The former generates RBS for ActiveSupport, while the latter does the same for ActionMailer—smoothing the way so your Rails stack becomes more type-aware with minimal friction. 🛤️
On the editor side, Takeshi Komiya strikes again with vscode-rbs-helper v1.3.0. This VS Code extension streamlines RBS editing—making jump-to-type and quick generation so much more intuitive. 🖊️
Venturing beyond pure typing territory—yet staying wonderfully adjacent—we have DSPy.rb, the brainchild of Vicente Reig Rincón de Arellano. This framework brings type-smart structure to LLM applications in idiomatic Ruby. With DSPy.rb, you define input/output schemas using Sorbet types—like T::Enum
and union types—turning brittle prompts into composable, robust pipelines. 🤖
Staying on the theme of testing, ruby-factory_bot-sorbet v0.1.0 (by Mateusz Drewniak) introduces FactoryBot::Sorbet
, giving your factories real type safety. Now your specs don’t just pass—they type-check. ✅
Then there’s sorbet-baml v0.3.0, another gem from Vicente (yes, the same innovator behind DSPy.rb!), which converts T::Struct
and T::Enum
into the lean, token-efficient Boundary AI Markup Language (BAML), cutting schema size by about 60% compared to JSON Schema. 📦
For those who learn by playing, check out Mini_RPG, by Gon-Code—a statically typed, Sorbet-powered mini-RPG implemented in Ruby (yes, conversations and combat in Spanish). With runtime type validation, it’s a fun and unique way to see typed Ruby in action. 🎮
Documentation lovers—this might not be type-specific, but it’s always welcome: the OAuth2 Ruby gem received updates this month. Its continued strong YARD/RBS coverage makes it a reliable, doc-friendly choice for token flows and integrations. 🔑
On the ecosystem side, gem_rbs_collection continues its role offering RBS for gems that aren’t yet typed. But turning a new page: the protobuf
gem will soon natively support RBS types right from the gem itself and will no longer rely on gem_rbs_collection. Check out the pull request here. ⏳ Great move! 🚀
A big architectural shift happened this summer: Shopify migrated RBS from a C-extension Ruby gem into a pure C library. The motivation? To make RBS usable directly by tools like Sorbet—without depending on the Ruby VM. This greatly boosts performance and portability. The team had to replace Ruby’s exception handling and garbage collection with manual error propagation and memory management in C, which was no small feat. The result is a lighter, faster foundation for type-checking Ruby at scale. There’s a detailed write-up on ruby-news.kr (in Korean), and if you want the full story, the RubyKaigi 2025 presentation is on YouTube. ⚡
Last but not least, RubyMine 2025.2 rolled out with some love for static typing. The update adds hover hints for RBS, making type signatures more visible right in your editor. You can read more in this community post on Reddit. 💡
TL;DR
This month felt like watching a symphony where each instrument—tracing, Rails integration, editing comfort, AI workflows, factory safety, compact schema language, playful learning, and IDE insight—played its part to amplify Ruby’s static typing journey. 🎶 From Takumi Shotoku and Takeshi Komiya’s tools to Mateusz Drewniak’s safer factories, Gon-Code’s playful learning platform, and Vicente Reig’s crossfire of typing innovation—the Ruby typing universe isn’t just advancing—it’s dancing. 💃
—Your faithful static typing guy
The essential Static Typing toolset
rbs
official Ruby Signature solution from the Ruby team
repo
rbs-inline
extension to rbs lets you write signatures in line with your code
repo
steep
type checker for the Ruby signatures
repo
sorbet
type signature and type checking solution designed by Stripe
repo
ruby-lsp
essential toolset and extension, which helps with Ruby development in the VS Code
repo
steep VS Code extension
steep integration with the IDE
repo
rbs syntax VS Code extension
ease the work with RBS signature files
repo
|
“Let's do TDD - type-driven development”
PROMOTION
Start writing robust Ruby software with static typing!
My RBS course equips you with essential knowledge you can apply to any Ruby-based software.
|