From: Jared Richardson Date: 2005-07-06T04:45:45+09:00 Subject: Re: What is wrong in this code ... ??? I'm no Ruby guru (and I'm sure you'll hear from others soon), but if you add def printName puts @name end then use this st = Student.new("Abc") ; #st.inspect st.printName you can run it like so: C:\dev\ruby>student.rb testName Abc C:\dev\ruby> Jared Ship It! is shipping! http://www.jaredrichardson.net http://www.pragmaticprogrammer.com/titles/prj/ "Faisal Raja" wrote in message news:1120590863.719406.196200@o13g2000cwo.googlegroups.com... > Hello , > Well Im new to programming in Ruby Language ( Infact only an hour back > i started it ) . > > class Student > > def initialize(name) > > @name = name > > end > > def show > > s = "Name : " + name > return s > > > end > end > > > st = Student.new("Abc") ; > st.inspect > > I have Windows Xp Sp2 n when i run this program on console , it doesn't > show me anything . There is no error but it is also not shwoing me > anything . > > st.inspect should show info > st.to_s also doesn't show anything > > > if i write st.show > it also doesn't work . > I wuld be thankful if u people help me out > Thanks in advance >