Profile-independent directory specification for NT?

My bad. I did #ENV{ instead of #{ENV. It behaves correctly now. I
appreciate the explanation.
Craig

···

-----Original Message-----
From: Austin Ziegler [mailto:austin@halostatue.ca]
Sent: Wednesday, February 25, 2004 12:27 PM
To: ruby-talk@ruby-lang.org
Subject: Re: Profile-independent directory specification for NT?

On Thu, 26 Feb 2004 01:38:25 +0900, Moran, Craig M (BAH) wrote:

Thanks! This works perfectly. However, Austin’s solution does not. I’d
imagine it was a misplaced quote. Is either style preferable over the
other? Craig

I just tried my version in Windows XP with irb and it produced the exact
result.

With the version provided by Jim Bob, you get a string, create a string, and

then add them to a new string. With mine, you’re only creating one string
through.

irb(main):030:0> profile_path = “#{ENV[‘USERPROFILE’]}\My Documents\”
=> “C:\Documents and Settings\Austin\My Documents\”

-austin

austin ziegler * austin@halostatue.ca * Toronto, ON, Canada
software designer * pragmatic programmer * 2004.02.25
* 12.21.29