Issue Type: Bug Bug
Affects Versions: JRuby 1.6.7
Assignee: Unassigned
Components: Core Classes/Modules
Created: 16/Jun/12 8:19 AM
Description:

The array returned by Module#constants should[1] have the most recently defined constant last but this is not the case.

module MyNamespace
class First
end

class Second
end

class Third
end
end

p MyNamespace.constants

  1. => [:Third, :Second, :First]

In this case they are in reverse order but that isn't always the case either.

[1] Not sure if I should be using the word "should", maybe this isn't behavior that one should rely on but that's how it has been on the standard interpreters for years.

Environment: Linux 3.0.0-16-generic #29-Ubuntu SMP Tue Feb 14 12:48:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

jruby 1.6.7 (ruby-1.9.2-p312) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_26) [linux-amd64-java]
Project: JRuby
Priority: Major Major
Reporter: Tasos Laskos
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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