From: James Edward Gray II Date: 2005-05-29T05:33:03+09:00 Subject: Re: object.inspect not working On May 28, 2005, at 3:15 PM, Navya Amerineni wrote: > hi all, > > i am very new to Ruby. > I stared writing very basic programs > The below is one of my program > class Song > def initialize(name, artist, duration) > @name=name > @artist=artist > @duration=duration > end > def myclass_function > puts "this is my first class" > end > end > class1=Song.new("Navya","Teja",540) > class1.myclass_function > class1.inspect > > > i am not getting any any output for the statement > class1.inspect inspect() returns a String which is often used to contain useful debugging information. inspect() does not print that String. > what might be possible correction You need to ask Ruby to print the String to the screen. Try changing the last line to: puts class1.inspect Hope that helps. James Edward Gray II