From: Brian Candler Date: 2009-11-24T20:01:36+09:00 Subject: Re: Programming ruby 1.9- question on page 37 4895 wrote: > not sure what to do which that code at the bottom of page 37. I enter > this code into the command prompt and obviously that isn't right. I > created the folder that I was told to before but I can't remember it > though I did skim a bit to find it. Not clear also on all that syntax > that was used there. I have tried to get a good definition of puts for > a month and have not been able > to. For the benefit of those of use without the 1.9 version of the book, can you post the code you are trying to run, and the exception you get in response? I don't think you will be held liable for copyright :-) For a definition of puts see http://www.ruby-doc.org/core/ and look for 'puts' in the right-hand column. Also the old version of Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/html/ref_m_kernel.html#Kernel.puts http://www.ruby-doc.org/docs/ProgrammingRuby/html/ref_c_io.html#IO.puts > If that is a method why is there another method (say_goodnight > (name)) on the same line? Perhaps what you are looking at is one method using the return value of another as a parameter. For example: def foo 123 end puts foo # same as: puts(foo()) -- Posted via http://www.ruby-forum.com/.