fix documentation example for `protect-out'
The example relied on the current code inspector affecting syntax object created during `eval', but since the switch from certificates to taints, the relevant code inspector is determined by the namespace, and a namespace gets its code inspector at creation time. Closes PR 12717
This commit is contained in:
parent
fc7f6bbe0f
commit
a8ca75b773
|
@ -982,7 +982,13 @@ as follows.
|
|||
(define weak-inspector (make-inspector (current-code-inspector)))
|
||||
(define (weak-eval x)
|
||||
(parameterize ([current-code-inspector weak-inspector])
|
||||
(eval x)))
|
||||
(define weak-ns (make-base-namespace))
|
||||
(namespace-attach-module (current-namespace)
|
||||
''nest
|
||||
weak-ns)
|
||||
(parameterize ([current-namespace weak-ns])
|
||||
(namespace-require ''nest)
|
||||
(eval x))))
|
||||
(require 'nest)
|
||||
(list num-eggs num-chicks)
|
||||
(weak-eval 'num-eggs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user