ruby/rake — pull request #12 by keathley (2014-12-18 01:53:21+00:00)
Title: Add fetch to task arguments.

This change allows TaskArguments to respond to fetch in the same way that a hash would. I ran into this scenario where I was trying to pass the args for a rake task directly into a class constructor. Calling args.fetch in that case results in nil values being returned. This was confusing at first because when the TaskArguments object is 'puts' or inspected, it returns what looks like a hash. It wasn't until I checked the class of the args that I realized the discrepancy. This change helps eliminate that confusion and would allow the arguments to be passed in directly.

I'm not sure if this is the right approach or if you should just call `to_hash` on the args (which is what I ended up doing). Any feedback would be great. Thanks!