On Wed, Jul 2, 2008 at 1:33 AM, John Lam (IRONRUBY) <jflam / microsoft.com> wrote:
> John Lam:
>
>> Luis Lavena:
>>
>> > USERPROFILE sometimes matches the location of roaming profiles, and
>> > not the HOMEDRIVE+HOMEPATH used is some NT domains.
>> >
>> > Ruby 1.9 uses a different list of options for HOME in case if not
>> > defined:
>> >
>> > [ruby-core:12347]
>> >
>> > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/12347
>> >
>> > "
>> > In 1.9, when ENV['HOME'] isn't set, it will be set using
>> > HOMEDRIVE+HOMEPATH, USERPROFILE, and "Personal" special-folder
>> > if they are all unset."
>> >
>> > I think similar approach should be taked by 1.8
>> >
>> > But again, those are my comments and only that.
>>
>> Awesome. We'll match the 1.9 behavior then.
>
> Actually, to clarify this a bit further, we won't *set* HOME, instead we'll use HOMEDRIVE+HOMEPATH, USERPROFILE, and "Personal" everywhere that Ruby uses HOME if HOME isn't defined.
>
> I don't think we should be setting HOME arbitrarily for the process.
>

For me was clear:

ENV['HOME'] || ENV['HOMEDRIVE'] + ENV['HOMEPATH'] ||
ENV['USERPROFILE'] for every time user try to do:

File.expand_path('~')
Dir.chdir do ... end
etc.

Regards,
-- 
Luis Lavena
AREA 17
-
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams