When constructing code, use the `object-name' of the input port *only*
if it's coming from a file -- not when it's a string. In that case, use `#f' for the name, so other code (specifically, `input->code') will use 'program. svn: r17987
This commit is contained in:
parent
a4954b774d
commit
2cc4429c62
|
@ -430,8 +430,8 @@
|
|||
(define (input->port inp)
|
||||
;; returns #f when it can't create a port
|
||||
(cond [(input-port? inp) inp]
|
||||
[(string? inp) (open-input-string inp)]
|
||||
[(bytes? inp) (open-input-bytes inp)]
|
||||
[(string? inp) (open-input-string inp #f)]
|
||||
[(bytes? inp) (open-input-bytes inp #f)]
|
||||
[(path? inp) (open-input-file inp)]
|
||||
[else #f]))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user