moai/moai-dev — pull request #864 by DanielSWolf (2014-03-17 21:13:08+00:00)
Title: Fixed bad upvalue for MOAILuaClass::_extendSingleton()

`MOAILuaClass::InitLuaSingletonClass()` tries to create a C closure from the `_extendSingleton()` method with the userdata and class table as upvalues. Even after @halfnelson's fix, however, it instead used two copies of the class table as upvalues. As a result, `_extendSingleton()` always received a NULL-pointer as first upvalue (because a table cannot be converted to userdata).