From 2cc4429c6250c275bac8554adb2a1037048e5c27 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 5 Feb 2010 03:22:23 +0000 Subject: [PATCH] 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 --- collects/scheme/sandbox.ss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/scheme/sandbox.ss b/collects/scheme/sandbox.ss index 897f94183c..f94f682779 100644 --- a/collects/scheme/sandbox.ss +++ b/collects/scheme/sandbox.ss @@ -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]))