Result of 'FOO ||= 2' differs from Ruby MRI
-------------------------------------------

                 Key: JRUBY-4278
                 URL: http://jira.codehaus.org/browse/JRUBY-4278
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.4
            Reporter: Gioele Barabucci
            Assignee: Thomas E Enebo


This script 

  #!/usr/bin/ruby -w
  FOO = 1
  FOO ||= 2
  puts "FOO = #{FOO}"

shows "FOO = 1" in MRI (1.8) and "FOO = 2" in JRuby 1.4.

Additionally, JRuby emits this warning: "warning: already initialized constant 
FOO".

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