As you know, I like to talk about idioms on this blog. A carefully chosen idiom can convey a lot in a few lines of code. Today I realized there’s an idiom I commonly use in my code that I haven’t really talked about before.
Typically, in Ruby, when we want to put a line of text to the console, we do it with puts:
puts "Hello, world!"
Now, there’s nothing wrong with this. It works just fine.
But for a while now, in...