"Jess Gabriel y Galn" <jgabrielygalan / gmail.com> wrote in post #1094106:
> string.downcase.scan(/\w+/) {|word| res[word] += 1}

I tried benchmarking out of curiosity and that is a lot faster! Nicely done.