Issue #6600 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Open to Closed

No.
----------------------------------------
Bug #6600: Should Module#constants retain insertion order?
https://bugs.ruby-lang.org/issues/6600#change-27276

Author: hasari (Hiro Asari)
Status: Closed
Priority: Normal
Assignee: 
Category: core
Target version: 
ruby -v: ruby 2.0.0dev (2012-06-16 trunk 36115) [x86_64-darwin11.4.0]


=begin
This is pointed out in ((<URL:http://bugs.jruby.org/6733>)).

Should (({Module#constants})) maintain the order in which the constants are defined?

 irb(main):001:0> RUBY_DESCRIPTION
 => "ruby 2.0.0dev (2012-06-16 trunk 36115) [x86_64-darwin11.4.0]"
 irb(main):002:0> module MyNamespace
 irb(main):003:1>     class First
 irb(main):004:2>     end
 irb(main):005:1> 
 irb(main):006:1*     class Second
 irb(main):007:2>     end
 irb(main):008:1> 
 irb(main):009:1*     class Third
 irb(main):010:2>     end
 irb(main):011:1> end
 => nil
 irb(main):012:0> 
 irb(main):013:0* p MyNamespace.constants
 [:First, :Second, :Third]
 => [:First, :Second, :Third]
=end


-- 
http://bugs.ruby-lang.org/