From: "alexeymuranov (Alexey Muranov)" Date: 2013-03-07T04:21:28+09:00 Subject: [ruby-core:53172] [ruby-trunk - Feature #8035] singleton class should be included in ancestors Issue #8035 has been updated by alexeymuranov (Alexey Muranov). Singleton class it the same thing as metaclass, right? I feel it would be better to keep it invisible, and maybe in the future to remove it completely and to allow objects to keep their singleton methods themselves. ---------------------------------------- Feature #8035: singleton class should be included in ancestors https://bugs.ruby-lang.org/issues/8035#change-37333 Author: marcandre (Marc-Andre Lafortune) Status: Open Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: core Target version: current: 2.1.0 I feel it would be consistent if: k.ancestors.include?(k) #=> always true if k.is_a?(Class) This is currently the case except for singleton classes: class << ""; include Enumerable; end.ancestors # => [Enumerable, String, Comparable, Object, Kernel, BasicObject] # would be more consistent: # => [#>, Enumerable, String, Comparable, Object, Kernel, BasicObject] Note that the singleton classes do appear in the ancestors if a module is instead prepended: class << ""; prepend Enumerable; end.ancestors # => [Enumerable, #>, String, Comparable, Object, Kernel, BasicObject] Thanks -- http://bugs.ruby-lang.org/