copied from activesupport/core_ext from Rails, MIT license
class_eval on an object acts like singleton_class.class_eval.
Returns the object‘s singleton class.
[Validate]