Tracebacks recognize metamethods '__close'

This commit is contained in:
Roberto Ierusalimschy
2019-07-31 11:22:39 -03:00
parent f645d31573
commit fe040633a1
2 changed files with 21 additions and 5 deletions

View File

@@ -651,6 +651,9 @@ static const char *funcnamefromcode (lua_State *L, CallInfo *ci,
case OP_SHRI: case OP_SHLI:
*name = "shift";
return "metamethod";
case OP_CLOSE: case OP_RETURN:
*name = "close";
return "metamethod";
default:
return NULL; /* cannot find a reasonable name */
}