From: matz@... Date: 2015-06-24T05:55:15+00:00 Subject: [ruby-core:69722] [Ruby trunk - Bug #11301] [Open] Module#prepend should have always added the module before the current Issue #11301 has been reported by Yukihiro Matsumoto. ---------------------------------------- Bug #11301: Module#prepend should have always added the module before the current https://bugs.ruby-lang.org/issues/11301 * Author: Yukihiro Matsumoto * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- I don't think it's ideal: module M end class A prepend M end A.ancestors # => [M, A, Object, PP::ObjectMixin, Kernel, BasicObject] class B [B, M, A, Object, PP::ObjectMixin, Kernel, BasicObject] It should be either error (for not adding module) or the module appearing multiple times, i.e. B.ancestors to be [M, B, M, A, Object, PP::ObjectMixin, Kernel, BasicObject] Matz. -- https://bugs.ruby-lang.org/