4

I have a class defined using theClass.class_eval and Object.const_set(className, theClass). Is there any way to remove the definition of this class? During testing I need to load different versions of the same class.

LK.
  • 4,499
  • 8
  • 38
  • 48

1 Answers1

6

Object.send(:remove_const, className) did the trick.

LK.
  • 4,499
  • 8
  • 38
  • 48