Make it work with frozen objects and vanilla rubies (>= 1.9.3 tested!)

Does what it says on the tin!