1.9.3p0 :003 > class A 1.9.3p0 :004?> end 1.9.3p0 :009 > A.is_a?(Module) => true 1.9.3p0 :010 > A.is_a?(Class) => true 1.9.3p0 :011 > Class.is_a?(Module) => true
class is module, so answer is append_features is run On Sep 20, 1:23 am, John Merlino <stoici...@aol.com> wrote: > append_features(mod) > > The documentation says: > > When this module is included in another, Ruby calls append_features in > this module, passing it the receiving module in mod. Ruby’s default > implementation is to add the constants, methods, and module variables > of this module to mod if this module has not already been added to mod > or one of its ancestors. See also Module#include. > > What if this module is included in a class, will append_features of > this module still be called, passing in the class as mod? This is in > particular reference to ActiveRecord::Concern, which has its own > implementation of append_features overriding ruby's. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.