fix: should detect method-definition by the string pattern-matching to avoid bug of luajit.