From 8f188fb2f792223f1a0c1730bd4ac99418d81d74 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 9 Jun 2017 14:29:54 +1000 Subject: Avoid .concat where simple to do so --- src/ldblib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ldblib.js') diff --git a/src/ldblib.js b/src/ldblib.js index ac3a2a4..441dec0 100644 --- a/src/ldblib.js +++ b/src/ldblib.js @@ -123,7 +123,7 @@ const db_getinfo = function(L) { let options = lauxlib.luaL_optstring(L, arg + 2, lua.to_luastring("flnStu", true)); checkstack(L, L1, 3); if (lua.lua_isfunction(L, arg + 1)) { /* info about a function? */ - options = ['>'.charCodeAt(0)].concat(options); /* add '>' to 'options' */ + options = lua.lua_pushfstring(L, lua.to_luastring(">%s"), options); /* add '>' to 'options' */ lua.lua_pushvalue(L, arg + 1); /* move function to 'L1' stack */ lua.lua_xmove(L, L1, 1); } else { /* stack level */ -- cgit v1.2.3-54-g00ecf