From: Robert Klemme Date: 2013-01-29T19:45:02+09:00 Subject: Re: Please explain in English On Mon, Jan 28, 2013 at 6:55 PM, Jesús Gabriel y Galán wrote: > res = Hash.new(0) > string.downcase.scan(/\w+/) {|word| res[word] += 1} > return res And to answer Wayne's question how to get rid of the "return": Hash.new(0).tap do |res| string.downcase.scan(/\w+/) {|word| res[word] += 1} end Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/