[Ironruby-core] Review: Support ENV['HOME']

Shri Borde Shri.Borde at microsoft.com
Tue Jul 21 15:44:21 EDT 2009


http://github.com/shri/ironruby/commit/0696a772f7f9708a15f18a5966125943cafb2010


·         Adds support for ENV['HOME'] by setting the HOME environment variable on startup. I have confirmed that MRI does actually set the process environment variable (and not just some value on a Ruby object)

·         Modifies the algorithm to calculate the value to set for HOME so that it passes the new tests

·         KernelOps.GetShell had to be modified to be able to span processes even after doing ENV.clear (like MRI)

·         Removes logic to calculate HOME from dev.bat

Files changed

 *   Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/env/element_reference_tags.txt<http://github.com/shri/ironruby/tree/0696a772f7f9708a15f18a5966125943cafb2010/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/env/element_reference_tags.txt>
 *   Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/env/element_reference_spec.rb<http://github.com/shri/ironruby/commit/0696a772f7f9708a15f18a5966125943cafb2010#diff-1>
 *   Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/env/fixtures/classes.rb<http://github.com/shri/ironruby/tree/0696a772f7f9708a15f18a5966125943cafb2010/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/env/fixtures/classes.rb>
 *   Merlin/Main/Languages/Ruby/ClassInitGenerator/Libraries/LibraryDef.cs<http://github.com/shri/ironruby/commit/0696a772f7f9708a15f18a5966125943cafb2010#diff-3>
 *   Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/EnvironmentSingletonOps.cs<http://github.com/shri/ironruby/commit/0696a772f7f9708a15f18a5966125943cafb2010#diff-4>
 *   Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs<http://github.com/shri/ironruby/commit/0696a772f7f9708a15f18a5966125943cafb2010#diff-5>
 *   Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs<http://github.com/shri/ironruby/commit/0696a772f7f9708a15f18a5966125943cafb2010#diff-6>
 *   Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs<http://github.com/shri/ironruby/commit/0696a772f7f9708a15f18a5966125943cafb2010#diff-7>
 *   Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/StringIO/StringIO.cs<http://github.com/shri/ironruby/commit/0696a772f7f9708a15f18a5966125943cafb2010#diff-8>
 *   Merlin/Main/Languages/Ruby/Scripts/Dev.bat<http://github.com/shri/ironruby/commit/0696a772f7f9708a15f18a5966125943cafb2010#diff-9>

Thanks,
Shri

From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero
Sent: Monday, July 20, 2009 10:48 AM
To: ironruby-core
Subject: [Ironruby-core] ENV['HOME'] is missing

ENV['HOME'] returns nil in ironruby while in ruby it returns my home folder
---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090721/aaa53caa/attachment.html>


More information about the Ironruby-core mailing list