mirror of
https://github.com/kikito/middleclass.git
synced 2024-11-25 02:44:20 +00:00
new metamethod __len,__pairs,__ipairs in lua 5.2
This commit is contained in:
parent
f10637b23b
commit
151c5b2c71
@ -97,7 +97,8 @@ end
|
||||
local Object = _createClass("Object", nil)
|
||||
|
||||
Object.static.__metamethods = { '__add', '__call', '__concat', '__div', '__le', '__lt',
|
||||
'__mod', '__mul', '__pow', '__sub', '__tostring', '__unm' }
|
||||
'__mod', '__mul', '__pow', '__sub', '__tostring', '__unm',
|
||||
'__len','__pairs','__ipairs'}
|
||||
|
||||
function Object.static:allocate()
|
||||
assert(type(self) == 'table', "Make sure that you are using 'Class:allocate' instead of 'Class.allocate'")
|
||||
|
Loading…
Reference in New Issue
Block a user