To my list of Ruby achievements, I can now add the dubious distinction of having come up with the syntax for the new “squiggly heredoc” introduced in version 2.3. Thus playing my part in making the Ruby grammar just a little bit more chaotic. For reference, the syntax looks like this: Using this syntax intelligently strips […]
Today I had reason to verify the exact semantics of ActiveSupport’s Object#try extension for an upcoming RubyTapas episode. #try is usually used to paper over nil values. Unfortunately, #try does more than this, and as a result it can easily hide defects. Consider: we have a variable with a number in it. We want to […]
A few weeks back I asked what ruby HTTP client library folks preferred. I’ve since collected over 700 responses, which seems like a pretty decent sample. You can check out the results for yourself, or look at the full list of responses, but here are some highlights. And the winner is…
We all know that Ruby’s built-in HTTP client library is a bit… wonky. As a result, there are a plethora of substitutes for it, each with unique features and boasting their own idea of a good HTTP client API. I’m curious: what HTTP client library do you reach for when you have a choice? And […]
The hacker sits down. It’s been a long time since he worked on this project, so he figures he should probably make sure the tests are passing first.