Skip to content

Instantly share code, notes, and snippets.

@Benjmin
Created August 5, 2012 17:19
Show Gist options
  • Save Benjmin/3266090 to your computer and use it in GitHub Desktop.
Save Benjmin/3266090 to your computer and use it in GitHub Desktop.
TypeError: can't convert String into Integer
from (irb):63:in `[]'
from (irb):63:in `ranker'
from (irb):68
ranks = {"Ben" => 1, "Denise" =>5," Bob" => 3
def ranker(person,*ranks)
person_key = ranks[person]
person = [person, person_key]
ranks = ranks.sort.reverse
return ranks.index(person) + 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment