From: kjana@...4lab.to (YANAGAWA Kazuhisa) Date: 2001-11-25T12:27:34+09:00 Subject: [ruby-talk:26410] Re: Converting ~fred to home directory path In message <20011125.112819.1555319301.31825@zipworld.com.au> harryo@zipworld.com.au writes: > In article <1006646006.774.0.camel@stargrazer>, "Sean Middleditch" > wrote: > > > No no. ~,^ Read the $HOME environment variable. /etc/passwd might not > > even have the user in it (login over NIS or LDAP). $HOME is supposed to > > be set by the login shell, so use that. > > That will work for just "~", but won't work for "~fred" when I'm logged > in as "jim". File.expand_path should do such expansion. Does it work? -- kjana@dm4lab.to November 25, 2001 Penny wise, pound foolish.