From: Yuguri Azuma Date: 2009-04-13T18:23:13+09:00 Subject: Re: retrieve ruby script file name Hello Robert, Thank you for the additional information. Regards, Yuguri Robert Klemme wrote: > On 05.04.2009 05:01, Hugh Evans wrote: >>> Thank you, >> >> puts File.basename(__FILE__) > > Note that there is $0 as well. __FILE__ will contain the name of the > file which contains the currently executed line of code while $0 will > contain the name of the script that the interpreter was started with. > When requiring and loading other files __FILE__ and $0 will point to > different names. > > Kind regards > > robert -- Posted via http://www.ruby-forum.com/.