ENV should not be a Hash
------------------------

                 Key: JRUBY-4947
                 URL: http://jira.codehaus.org/browse/JRUBY-4947
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.6
            Reporter: Hiro Asari


This got me by surprise, but

{noformat}
$ ruby1.9 -v -e 'p ENV.kind_of? Hash'
ruby 1.9.3dev (2010-07-15 trunk 28648) [x86_64-darwin10.4.0]
false
$ ruby -v -e 'p ENV.kind_of? Hash'
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
false
$ jruby -v -e 'p ENV.kind_of? Hash'
jruby 1.6.0.dev (ruby 1.8.7 patchlevel 249) (2010-07-18 e910337) (Java 
HotSpot(TM) 64-Bit Server VM 1.6.0_20) [x86_64-java]
true
{noformat}

In fact, {{ENV}} is an {{Object}} with a lot of singleton methods that make it 
look like it's a {{Hash}}.

I guess this is the reason that {{ENV.to_hash}} exists.

Currently {{ENV}} and {{JAVA_ENV}} implemented through {{StringOnlyRubyHash}}, 
which extends {{RubyHash}}.

-- 
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


Reply via email to