From: "Christopher J. Bottaro" Date: 2008-07-12T00:18:09+09:00 Subject: instance_eval or class_eval on metaclass? I was looking at someone's implementation of #meta_eval and I noticed they used #instance_eval. I've always been using #class_eval with metaclasses and getting my desired effect. So why use #instance_eval over #class_eval when working with metaclasses? Furthermore, I can't even tell a difference, as demonstrated by this code snippet. class Object def metaclass class << self self end end end class Test def f metaclass.class_eval do puts self.inspect end end def g metaclass.instance_eval do puts self.inspect end end end t = Test.new t.f t.g #> #> Using #class_eval and #instance_eval both produce the same result. Can anyone shed some light on this subject? Thanks.