From: Gennady Date: 2003-12-19T00:47:56+09:00 Subject: Re: setting $0 I experienced the same problem just 2 weeks ago. It happens on Solaris as well as on Linux. I was about to post it here, when I found a work around: you can use $0.replace instead of $0= Gennady. Yukihiro Matsumoto wrote: > Hi, > > In message "setting $0" > on 03/12/18, Joel VanderWerf writes: > > |With the following file, t.rb, > | > |---- > |#!/usr/bin/env ruby > | > |$0 = 'My Application' > |puts $0 > |---- > | > |the output is: > | > |$ ruby -v t.rb > |ruby 1.8.1 (2003-12-05) [i686-linux] > |My Applicati > | > |Why does it get truncated? > > It's a Linux restriction. Wishing if linux has setproctitle(3). > Interestingly, my linux box has a setproctitle man page. > > matz. >