On 12.07.2010 18:35, Abder-rahman Ali wrote: > I have this part of code from "Why's poignant guide to Ruby" that is > intended to make substitution: > > Note: code_words here is a hash > > .. > idea = gets > code_words.each do |real, code| > idea.gsub!(real, code) > end > .. > > I know that "real" is what to find, and "code" is what to put in place. > But, what I'm not getting here is why is this written: > > idea.gsub!(.... > > I don't mean the gsub! method, but, why "idea"? What does it here? How > can we read that line of script? This is simply a string read from stdin - nothing more. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/