holman/shamazing — pull request #3 by xoebus (2012-04-20 00:38:16+00:00)
Title: Stop error being shown when no arguments are provided

I was getting the following error when calling `shamazing` with no arguments in a Git repository. This was caused by the `[]` value of `ARGV` being truthy and the wrong conditional path being taken.

/Users/cb/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/shamazing-0.0.4/lib/shamazing.rb:10:in `string': undefined method `downcase' for []:Array (NoMethodError)
from /Users/cb/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/shamazing-0.0.4/bin/shamazing:79:in `'
from /Users/cb/.rbenv/versions/1.9.3-p125/bin/shamazing:19:in `load'
from /Users/cb/.rbenv/versions/1.9.3-p125/bin/shamazing:19:in `

'

The output after this pull request is to find the longest string and integer in the current Git repository.

Longest string: dabbbd
Longest integer: 431984899

This pull request also sneaks in a wee patch (3a97e61be2fcbdb440b24dfd6f7c4074463ad0d9) that was needed to make the tests run on my machine.

Cheers!