don't make an eval the very first time

This commit is contained in:
Laurent Sansonetti
2012-03-29 13:04:38 +02:00
parent b606faf5d4
commit eb322d8f62

View File

@@ -172,7 +172,14 @@ current_repl_prompt(NSString *top_level)
{
char question = '?';
if (top_level == nil) {
top_level = [delegate replEval:@"self"];
static bool first_time = true;
if (first_time) {
top_level = @"main";
first_time = false;
}
else {
top_level = [delegate replEval:@"self"];
}
question = '>';
}