From: mail@... Date: 2016-05-17T15:51:02+00:00 Subject: [ruby-core:75575] [Ruby trunk Bug#12389] Module#constants includes non-constants Issue #12389 has been reported by Jan Lelis. ---------------------------------------- Bug #12389: Module#constants includes non-constants https://bugs.ruby-lang.org/issues/12389 * Author: Jan Lelis * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- 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: