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:
Eli Barzilay 2010-02-05 03:22:23 +00:00
parent a4954b774d
commit 2cc4429c62

View File

@ -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]))