From: Gary Wright Date: 2009-07-17T15:24:40+09:00 Subject: Re: trouble with puts On Jul 17, 2009, at 2:09 AM, Venkat Akkineni wrote: > > # The same line inside a method in a class doesn't work > class Something > > def print_something > > puts "something" > > end > end > >> ruby something.rb > > # I don't see the expected Output > > > Could somebody throw some light on this. Code that is within a method definition doesn't get executed until an instance is created and the method is called. Add the following to your third example after the class definition block for Something: Something.new.print_something Gary Wright