For those more versed than myself, I have a follow on question (thank for 
posting this Jooma). 

In this example can't you get rid of return res?

Wayne


----- Original Message ----
From: jooma lavata <lists / ruby-forum.com>
To: ruby-talk ML <ruby-talk / ruby-lang.org>
Sent: Mon, January 28, 2013 11:40:24 AM
Subject: Please explain in English

I'm learning Ruby and I'm reading some expression that I saw on the
forum. I'm coming from Javascript. This is really hard for me. Please
help explain to me in plain English. I understand that it's a Function
that takes string and count words to return a Hash.

def count_words(string)
  res = Hash.new(0)
  string.downcase.scan(/\w+/).map{|word| res[word] =
string.downcase.scan(/\b#{word}\b/).size}
  return res
end