lunarmodules / busted

Elegant Lua unit testing.
https://lunarmodules.github.io/busted/
MIT License
1.39k stars 184 forks source link

Issue 666: restore globals set to nil in insulate block #667

Closed Henkoglobin closed 2 years ago

Henkoglobin commented 2 years ago

Seems to be an easy fix, though I'd love feedback on the if in line 22 of context.lua: I don't think that there's a reason to restore if rawget(_G, k) ~= nil (as then it'd be restored in the first loop), right?

Fixes #666

Tieske commented 2 years ago

thx for fixing #666 👿