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/20090720/3f719f0e/attachment.html>
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>
http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125 These are the changes from Tomas?s code review feedback ? Moves setting of %HOME% from IronRuby.Libraries.dll to ir.exe. This is ruby.exe feature, not necessarily a language feature, and setting of environment variables should be something that the host controls. ? Moved the ExpandPath logic to RubyUtils, and also made it work with System.String instead of MutableString Files changed * Merlin/Main/Languages/Ruby/ClassInitGenerator/Libraries/LibraryDef.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-0> * Merlin/Main/Languages/Ruby/Console/Program.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-1> * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Dir.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-2> * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/EnvironmentSingletonOps.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-3> * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-4> * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-5> * Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyUtils.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-6> Thanks, Shri From: Shri Borde Sent: Tuesday, July 21, 2009 12:44 PM To: ironruby-core Cc: IronRuby External Code Reviewers Subject: Review: Support ENV[''HOME''] 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/0e3719d4/attachment.html>
Looks good. Tomas From: Shri Borde Sent: Tuesday, July 21, 2009 10:03 PM To: ironruby-core at rubyforge.org Cc: IronRuby External Code Reviewers Subject: RE: Review: Support ENV[''HOME''] http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125 These are the changes from Tomas?s code review feedback ? Moves setting of %HOME% from IronRuby.Libraries.dll to ir.exe. This is ruby.exe feature, not necessarily a language feature, and setting of environment variables should be something that the host controls. ? Moved the ExpandPath logic to RubyUtils, and also made it work with System.String instead of MutableString Files changed * Merlin/Main/Languages/Ruby/ClassInitGenerator/Libraries/LibraryDef.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-0> * Merlin/Main/Languages/Ruby/Console/Program.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-1> * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Dir.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-2> * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/EnvironmentSingletonOps.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-3> * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-4> * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-5> * Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyUtils.cs<http://github.com/shri/ironruby/commit/421d9869c60d892b36ba324ce9cb8c89bdc77125#diff-6> Thanks, Shri From: Shri Borde Sent: Tuesday, July 21, 2009 12:44 PM To: ironruby-core Cc: IronRuby External Code Reviewers Subject: Review: Support ENV[''HOME''] 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/20090722/6ed846db/attachment.html>