Why are you not using [BasicObject](http://www.ruby-doc.org/core-2.1.0/BasicObject.html) for that instead of using Object and then undefining by hand?