From: "Jesús Gabriel y Galán" Date: 2013-01-29T02:58:53+09:00 Subject: Re: Please explain in English On Mon, Jan 28, 2013 at 6:45 PM, Wayne Brisette wrote: > 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? You could, using inject, but some people might say this is less readable, and also creates some intermediate object that is not really needed: string.downcase.scan(/\w+/).inject(Hash.new(0)) {|h, word| h[word] += 1; h} Jesus.