From: "August Y." Date: 2012-11-03T03:52:00+09:00 Subject: Simple question I have just picked up ruby and am trying to teach my self. so this question is probably easy but its giving me fits. class Test def round puts "the object is round" end def random $radus=rand(10)+1 <---Global Variable end def coords x=rand(1000) y=rand(1000) z=rand(1000) lo=[x,y,z] puts lo end def size pi=Math::PI area=pi*(radus^2) <----error cant find radus? volume = 4/3*pi*(radus^3) puts volume puts radus puts area end def landmass landmass=size.area*0.33 <--- why is this wrong? puts landmass end t=Test.new puts t.landmass end other than my ugly code; why doesn't size see radus and landmass see area -- Posted via http://www.ruby-forum.com/.