diff --git a/docs/changelog.txt b/docs/changelog.txt index d8dca022e..34f5c3660 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -42,6 +42,9 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Fixes - `tweak` embark-profile-name: fixed handling of the native shift+space key +## Lua +- ``pairs()`` now returns available class methods for DF types + # 0.47.04-beta1 ## Fixes diff --git a/library/LuaWrapper.cpp b/library/LuaWrapper.cpp index 3b8471d27..497addd5c 100644 --- a/library/LuaWrapper.cpp +++ b/library/LuaWrapper.cpp @@ -1608,8 +1608,8 @@ static void RenderType(lua_State *state, compound_identity *node) lua_dup(state); lua_setfield(state, ix_meta, "__index"); - // pairs table - lua_newtable(state); + // pairs table - reuse index table + lua_dup(state); int ptable = base+4; lua_pushvalue(state, ptable);