From: Gennady Date: 2003-05-20T08:39:04+09:00 Subject: Re: The interpreter path ----- Original Message ----- From: "Tom Felker" To: "ruby-talk ML" Sent: Monday, May 19, 2003 4:22 PM Subject: Re: The interpreter path > On Mon, 2003-05-19 at 10:58, Gennady wrote: > > Hi, fellow rubyists > > > > Is there a way to get the path for the Ruby interpreter itself from > > withing a script? I see rb_argv0 in Ruby 1.6.8 source, however I > > cannot find the binding to a Ruby constant or some other means to > > obtain it. Is there any? > > > > Gennady. > > If there isn't a better Ruby way (if not, there should be), in Linux, > /proc/yourpid/exe points to that executable. Very interesting, I did not know about it. Unfortunatelly I need something portable that should run at least on Linux and Solaris. A Ruby constant might be quite handy. Thank you very much, Gennady. > > -- > Tom Felker > > Miss work? But my life would be nothing without the nucleon plant. > -- Homer, The Simpsons > > >