jimweirich/rake — pull request #217 by danielsz (2013-08-06 07:24:40+00:00)
Title: empty? method on TaskArguments

I wanted to write a task that accepted arguments, but if they were not provided, set default values in the body of the task.
Turned out args.empty? always returns false because the missing method sends it to the lookup method which just states that :empty? is no known key.

So, according to the principle of least surprise (POLS), I suggest that args.empty? just does the obvious thing, and returns true if the hash is empty.

Rake is so venerable and old, I'm surprised I'm the first to bump into this. But hey, good opportunity to say hello and submit a PR.