Fix undefined local variable or method `klass'

klass and id were not defined when deserializing ruby objects, causing an undefined error when trying to raise a DeserializationError. This should be fixed now.