Ruby - Inheritance
What will this Ruby code print?
module Flyable; end class Bird include Flyable end bird = Bird.new puts bird.kind_of?(Flyable)
module Flyable; end class Bird include Flyable end bird = Bird.new puts bird.kind_of?(Flyable)
bird.kind_of?(Flyable) returns true because modules included behave like ancestors.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions