From: "Thomas B." Date: 2008-09-18T06:00:39+09:00 Subject: Re: which Class called my Class? Zach Buckholz wrote: > I have a script that queries servers in our environment to assist with > patch-levels etc... I am having an issue and need to backtrace which > class called my class. > > What I currently have > print "\nCollectData Failed 2: in needDate != yes & package == none > #{hostName}\n" > > What I would like to have > print "\nCollectData Failed 2: in needDate != yes & package == none > #{hostName}, called from #{callingClass}\n" If I understand correctly what you want, try using the command +caller+ to get what you want. It returns an array with current stack trace. TPR. -- Posted via http://www.ruby-forum.com/.