Understanding `self` in Ruby
Many problems faced by beginning Rubyists are caused by not understanding self. Join me and take a deep dive into self in Ruby under common and uncommon conditions.
Many problems faced by beginning Rubyists are caused by not understanding self. Join me and take a deep dive into self in Ruby under common and uncommon conditions.
In this post, we'll dive into regex conditionals and discuss how to work around the limitations in Ruby's implementation of them
Are refinements slow? I wrote a few benchmarks to find out. The answer was surprising.
If you've never used Ruby's refinements, you might be surprised to learn that they're lexically scoped. We'll discuss what this means, and the implications for your code.
You tried turbolinks, once, and soon your app began to fail in strange and wonderful ways. But some people make it work. What's their secret? The answer is so simple, it just might amaze you.
When you treat your collections as enumerators, you get to use all your favorite functions like #map and #reduce without having to write any extra code. In this post I show you how easy it is to create enumerators on the fly, without defining extra classes or messing around with the Enumerable module.
These days it's pretty common to see #freeze used in Ruby code. But it's often not entirely clear WHY freeze is being used. In this post we'll look at the most common reasons a developer might freeze variables.