Ruby's Enumerable module gives you 50+ methods for free. Understanding it changes how you think about collections, pipelines, and data transformation.
Hash#[] silently returns nil for missing keys. Hash#fetch raises an error. That distinction prevents more bugs than you'd expect.
Ruby has three methods for building clean data pipelines: tap, then, and yield_self. Each does something slightly different, and knowing which to reach for makes your code more expressive.
Why Ruby's 'if it quacks like a duck' philosophy leads to more flexible, testable, and elegant code.
Ruby's metaprogramming is its most powerful and most dangerous feature. Here's how experienced teams decide when to use it and when to walk away.
Concerns are controversial in the Rails world. They shouldn't be. The problem isn't the pattern, it's how people use it. Here's how to use concerns well.
Ruby was designed to make programmers happy. That's not a slogan, it's a design philosophy that shaped how the language reads, and why that still matters.
When you call a method in Ruby, there's a specific chain of places Ruby looks to find it. Understanding that chain is the key to debugging 'wrong method called' bugs.
The frozen_string_literal pragma is one line of code that prevents mutation bugs, improves performance, and signals intent. Here's why you should be using it everywhere.
Ruby didn't just popularize test-driven development, it made testing feel inevitable. Here's how a community obsession became an industry standard.
Most Rake tasks are untested blobs of procedural code. Here's how to write ones that are namespaced, documented, testable, and actually maintainable.
Include Comparable, define one method, and get six comparison operators plus sorting for free. It's one of Ruby's best-kept secrets for custom objects.
N+1 queries, unnecessary column loading, and the count/size/length trap. These three patterns silently kill Rails performance, and they're easy to fix.
Ruby 3's pattern matching with case/in isn't just syntax sugar. It's a fundamentally different way to destructure data, and it's been production-ready since 3.1.
Ruby gives you two ways to create simple data objects. One is fast, explicit, and production-ready. The other is convenient, flexible, and almost always the wrong choice.
Introducing RubyHash, a simple tool to diff your Ruby hashes side by side.
Subscribe to get new Ruby and Rails articles delivered straight to your inbox.