From: jooma lavata Date: 2013-01-29T02:39:46+09:00 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 -- Posted via http://www.ruby-forum.com/.