Does anyone have a good explanation for this?
class Foo end Foo.instance_eval do def jump "jumping..." end define_method(:shout) do "shouting..." end end Foo.respond_to? :jump => true Foo.respond_to? :shout => false Foo.new.respond_to? :shout => true
It seems that define_method is pushing the method ‘shout’ into Foo’s own m_tbl instead of in the metaclass. This was a little unexpected to me.