They both allow you to change the identity of 'self' for the duration of a block. class_eval sets things up as if you were in the body of a class definition. instance_eval acts as though you were working inside the singleton class of 'self'.