Class.__subclasses__ incompatible with Rails
--------------------------------------------

                 Key: JRUBY-5377
                 URL: http://jira.codehaus.org/browse/JRUBY-5377
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6RC1
            Reporter: John Firebaugh
            Assignee: Thomas E Enebo


Rails's [implementation of 
Class.subclasses|https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/class/subclasses.rb#L6]
 uses Class.\_\_subclasses\_\_ if available. 1.6.0 implements 
Class.\_\_subclasses\_\_ in a way that's not compatible with what Rails 
expects. I'm not sure if \_\_subclasses\_\_ is considered private in JRuby or 
what, but either JRuby or Rails will need to be patched.

{code}
class A
end

module M
end

class B < A
  include M
end

A.__subclasses__ #=> [M]
{code}

The expected result is [B].

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