Odd ||= behavior with ENV
-------------------------
Key: JRUBY-3960
URL: http://jira.codehaus.org/browse/JRUBY-3960
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.3.1
Environment: OS X 10.6
Reporter: PJ Hyett
Assignee: Thomas E Enebo
~$ jirb
irb(main):001:0> RAILS_ROOT = "blah"
=> "blah"
irb(main):002:0> RAILS_ROOT = RAILS_ROOT || ENV["RAILS_ROOT"]
(irb):3 warning: already initialized constant RAILS_ROOT
=> "blah"
irb(main):003:0> RAILS_ROOT ||= ENV["RAILS_ROOT"]
(irb):4 warning: already initialized constant RAILS_ROOT
=> nil
Using ||= sets the RAILS_ROOT constant to nil even though it's already set, but
doing it long-hand works fine.
--
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