Dynamic constant lookup in class << self
----------------------------------------

                 Key: JRUBY-4964
                 URL: http://jira.codehaus.org/browse/JRUBY-4964
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.5
            Reporter: Magnus Holm
            Assignee: Thomas E Enebo


    module Helper
      def bug
        class << self
          C
        end
      end
    end

    class A
      include Helper
      C = 1
    end

    class B
      include Helper
      C = 2
    end

    p A.new.bug
    p B.new.bug

In MRI (1.8.7, 1.9.1, 1.9.2) this prints 1 and 2, while in JRuby (and Rubinius) 
it prints 1 and 1.


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