close the input after reading
svn: r12775
This commit is contained in:
parent
251d15f800
commit
baffbeeeb2
|
@ -322,7 +322,9 @@
|
||||||
(cond [(and p (null? (cdr inps)))
|
(cond [(and p (null? (cdr inps)))
|
||||||
(port-count-lines! p)
|
(port-count-lines! p)
|
||||||
(parameterize ([current-input-port p])
|
(parameterize ([current-input-port p])
|
||||||
((sandbox-reader) source))]
|
((sandbox-reader) source)
|
||||||
|
;; close a port if we opened it
|
||||||
|
(unless (eq? p (car inps)) (close-input-port p)))]
|
||||||
[p (error 'input->code "ambiguous inputs: ~e" inps)]
|
[p (error 'input->code "ambiguous inputs: ~e" inps)]
|
||||||
[else (let loop ([inps inps] [n n] [r '()])
|
[else (let loop ([inps inps] [n n] [r '()])
|
||||||
(if (null? inps)
|
(if (null? inps)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user