Project

General

Profile

Actions

Bug #12594

closed

The class does not inherit from a module the modules that were included after the inclusion

Added by faucct (Nikita Sokolov) over 5 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
2.3.0, 2.3.1
[ruby-core:76397]
Tags:

Description

Reproduced in ruby 2.3.0 and 2.3.1
You can see that the result changes if I swap places LimitedPeriod.include Period and Period.include Serialization.

module Serialization
end

module Period
end

Period.include Serialization

class LimitedPeriod
  include Period
end

LimitedPeriod < Serialization
# => true
module Serialization
end

module Period
end

class LimitedPeriod
  include Period
end

Period.include Serialization

LimitedPeriod < Serialization
# => false
Actions

Also available in: Atom PDF