Skip to content

fix(interpreter): remove exported vars from env on unset#1042

Merged
chaliy merged 1 commit intomainfrom
fix/issue-946-unset-exported-var
Apr 3, 2026
Merged

fix(interpreter): remove exported vars from env on unset#1042
chaliy merged 1 commit intomainfrom
fix/issue-946-unset-exported-var

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 3, 2026

Summary

  • unset VAR now also removes the variable from self.env, not just self.variables
  • Previously, variable lookup fell back to self.env, so exported variables remained accessible after unset
  • Added spec tests for unset of exported and regular variables

Closes #946

unset VAR removed the variable from self.variables but not self.env.
Since variable lookup falls back to self.env, unset exported variables
remained accessible. Now self.env.remove() is called alongside
self.variables.remove().

Closes #946
@chaliy chaliy merged commit 083af5b into main Apr 3, 2026
27 checks passed
@chaliy chaliy deleted the fix/issue-946-unset-exported-var branch April 3, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unset does not remove exported variables from the environment

1 participant