diff options
author | arichard <richard4@cs.stanford.edu> | 2021-11-17 00:35:32 +0300 |
---|---|---|
committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2022-01-05 23:35:18 +0300 |
commit | 8ae24aa1e450644d56d436772c28582af9ccbad4 (patch) | |
tree | 8301201ce6db11c55824bc02db3787036ad4c94c | |
parent | 585f0c5e98e19b2ca19bf8138b518c58198c0c09 (diff) |
fix(pl) import_into using the previous environment's __newindex if set
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | lua/pl/import_into.lua | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 32b4198..405fcb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,9 @@ see [CONTRIBUTING.md](CONTRIBUTING.md#release-instructions-for-a-new-version) fo [#400](https://github.com/lunarmodules/Penlight/pull/400) - fix: `stringx.expandtabs` could error out on Lua 5.3+ [#406](https://github.com/lunarmodules/Penlight/pull/406) + - fix: `pl` the module would not properly forward the `newindex` metamethod + on the global table. + [#395](https://github.com/lunarmodules/Penlight/pull/395) ## 1.11.0 (2021-08-18) diff --git a/lua/pl/import_into.lua b/lua/pl/import_into.lua index 6dd2741..46aaa3e 100644 --- a/lua/pl/import_into.lua +++ b/lua/pl/import_into.lua @@ -50,7 +50,7 @@ return function(env) if prevenvmt then _prev_index = prevenvmt.__index if prevenvmt.__newindex then - gmt.__index = prevenvmt.__newindex + gmt.__newindex = prevenvmt.__newindex end end |