From: "ara.t.howard" Date: 2007-07-03T15:42:58+09:00 Subject: Re: getting rid of $0 On Jul 2, 2007, at 3:03 PM, Jano Svitok wrote: > Anyway, $0 seems to be a normal variable that you can set to anything > you want, so creating a small wrapper script should not be a problem. > E.g. > > $0 = ARGV.shift > require $0 be careful, $0 is not a normal variable: cfp:~ > cat a.rb $0 = 'foobar' puts `ps wwwaux|grep foobar` cfp:~ > ruby a.rb ahoward 10371 2.6 -0.1 29204 1388 p2 S+ 12:41AM 0:00.01 foobar ahoward 10372 1.4 -0.0 27728 584 p2 S+ 12:41AM 0:00.00 sh -c ps wwwaux|grep foobar ahoward 10374 1.2 -0.0 27368 448 p2 S+ 12:41AM 0:00.00 grep foobar it actually assigns to c's argv -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama