Q: What value gets printed?
Answered
quizz 1/36
module A end module B end class C prepend A include B end p C.ancestors # what value gets printed here ?
copy
Ruby 3.3.0
[C]
[B, C, A, Object, PP::ObjectMixin, Kernel, BasicObject]
[A, C, B, Object, PP::ObjectMixin, Kernel, BasicObject]
[C, A, B, Object, PP::ObjectMixin, Kernel, BasicObject]
privacy policy