add another example with require inside eval for protect-out
svn: r13908
This commit is contained in:
parent
bc3e541cf6
commit
11923c3567
|
@ -843,6 +843,20 @@ follows.
|
|||
(require 'a)
|
||||
foo
|
||||
(weak-eval 'foo)
|
||||
]
|
||||
|
||||
Note that @scheme[require] works within eval as well.
|
||||
@defexamples[#:eval (syntax-eval)
|
||||
(module a scheme
|
||||
(provide (protect-out foo))
|
||||
(define foo 1))
|
||||
(define weak-inspector (make-inspector (current-code-inspector)))
|
||||
(define (weak-eval x)
|
||||
(parameterize ([current-code-inspector weak-inspector])
|
||||
(eval x)))
|
||||
(weak-eval '(require 'a))
|
||||
foo
|
||||
(weak-eval 'foo)
|
||||
]}
|
||||
|
||||
@specsubform[#:literals (for-meta)
|
||||
|
|
Loading…
Reference in New Issue
Block a user