Dir.tmpdir has different default on Windows
-------------------------------------------
Key: JRUBY-2309
URL: http://jira.codehaus.org/browse/JRUBY-2309
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Environment: JRuby 1.1RC3, Windows XP Pro
Reporter: Daniel Berger
Priority: Minor
In MRI Dir.tmpdir resorts to the windows directory + temp on MS Windows if none
of the environment variables are found. JRuby appears to default to the current
directory:
{noformat}
require 'tmpdir'
ENV['TMPDIR'] = nil
ENV['TMP'] = nil
ENV['TEMP'] = nil
ENV['USERPROFILE'] = nil
p Dir.tmpdir
{noformat}
MRI returns C:\WINNT\Temp
JRuby returns the current directory
Personally, I think defaulting to '.' is a bad idea. See this blog for one
reason why:
http://www.almostserio.us/articles/2008/01/07/scary-unexpected-results-in-ruby-tmpdir-code
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email