diff --git a/polymod/hscript/_internal/PolymodInterpEx.hx b/polymod/hscript/_internal/PolymodInterpEx.hx index 53eb885..7edebe7 100644 --- a/polymod/hscript/_internal/PolymodInterpEx.hx +++ b/polymod/hscript/_internal/PolymodInterpEx.hx @@ -51,8 +51,6 @@ class PolymodInterpEx extends Interp { super(); _proxy = proxy; - variables.set("Math", Math); - variables.set("Std", Std); this.targetCls = targetCls; } @@ -219,6 +217,12 @@ class PolymodInterpEx extends Interp } } + override function resetVariables() { + super.resetVariables(); + variables.set("Math", Math); + variables.set("Std", Std); + } + public function clearScriptClassDescriptors():Void { // Clear the script class descriptors. _scriptClassDescriptors.clear();