Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Optimizing Ruby's JSON, Part 2.
def dump(obj, anIO = (no_args_set = true; nil), limit = nil, kwargs = nil)
I love that trick because it exploits the fact that, like pretty much everything in Ruby, arguments’ default values are expressions. This trick is most commonly used when you need to know if an argument was passed as nil or just not passed
Pretty cool way to do nil checking
There are no comments on this comment yet.
def dump(obj, anIO = (no_args_set = true; nil), limit = nil, kwargs = nil)
I love that trick because it exploits the fact that, like pretty much everything in Ruby, arguments’ default values are expressions. This trick is most commonly used when you need to know if an argument was passed as nil or just not passed
Pretty cool way to do nil checking