From: Taylor R Campbell Date: Mon, 26 Aug 2019 03:15:43 +0000 (+0000) Subject: Fix leak of floating-point environment in test-arith.scm. X-Git-Tag: mit-scheme-pucked-10.1.20~11^2~57 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d526f15c426172731f81ec522bcd15d23e9af3b4;p=mit-scheme.git Fix leak of floating-point environment in test-arith.scm. --- diff --git a/tests/runtime/test-arith.scm b/tests/runtime/test-arith.scm index 14dfad5f5..7c6b9d78d 100644 --- a/tests/runtime/test-arith.scm +++ b/tests/runtime/test-arith.scm @@ -128,11 +128,13 @@ USA. (define (yes-traps f) (if (flo:have-trap-enable/disable?) ;; XXX Should enable all traps. - (begin - (flo:clear-exceptions! (flo:supported-exceptions)) - (flo:with-trapped-exceptions - (fix:or (flo:exception:invalid-operation) (flo:exception:overflow)) - f)) + (flo:preserving-environment + (lambda () + (flo:clear-exceptions! (flo:supported-exceptions)) + (flo:with-trapped-exceptions + (fix:or (flo:exception:invalid-operation) + (flo:exception:overflow)) + f))) (f))) (define (define-enumerated-test prefix cases procedure)