From a80d704ceb4e7d85dc54a9c3706d6ffa7bf2412f Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 7 Jan 2018 02:05:22 +1100 Subject: src/lauxlib.js: Export luastring_eq --- src/lauxlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lauxlib.js') diff --git a/src/lauxlib.js b/src/lauxlib.js index e94b886..b2ee971 100644 --- a/src/lauxlib.js +++ b/src/lauxlib.js @@ -154,7 +154,7 @@ const luaL_argerror = function(L, arg, extramsg) { lua.lua_getinfo(L, lua.to_luastring("n"), ar); - if (ar.namewhat.toString() === lua.to_luastring("method").toString()) { /* TODO: luastring_eq? */ + if (lua.luastring_eq(ar.namewhat, lua.to_luastring("method"))) { arg--; /* do not count 'self' */ if (arg === 0) /* error is in the self argument itself? */ return luaL_error(L, lua.to_luastring("calling '%s' on bad self (%s)"), ar.name, extramsg); -- cgit v1.2.3-54-g00ecf