From: usa@... Date: 2016-06-10T07:14:54+00:00 Subject: [ruby-core:75926] [Ruby trunk Bug#12389] Module#constants includes non-constants Issue #12389 has been updated by Usaku NAKAMURA. Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: DONE, 2.3: REQUIRED ruby_2_2 r55356 merged revision(s) 55182. ---------------------------------------- Bug #12389: Module#constants includes non-constants https://bugs.ruby-lang.org/issues/12389#change-59117 * Author: Jan Lelis * Status: Closed * Priority: Normal * Assignee: * ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] * Backport: 2.1: REQUIRED, 2.2: DONE, 2.3: REQUIRED ---------------------------------------- Hi Ruby Core, I noticed that `Module#constants(false)` sometimes includes modules/classes with a lowercase name: ```ruby Complex.constants # => [:I] Complex.constants(false) # => [:compatible, :I] Complex.const_defined? :compatible # NameError: wrong constant name compatible NameError.constants # => [] NameError.constants(false) # => [:message] ``` Also: - Rational --> compatible - IO --> generic_readable - IO --> generic_writable -- https://bugs.ruby-lang.org/ Unsubscribe: