Quick fix for REPLs so empty statements return None instead of '__file__'

This commit is contained in:
K. Lange 2021-01-29 10:37:57 +09:00
parent 135bf80196
commit ed4a89ec42

View File

@ -4841,6 +4841,11 @@ KrkValue krk_interpret(const char * src, int newScope, char * fromName, char * f
krk_pop();
krk_push(OBJECT_VAL(closure));
if (!newScope) {
/* Quick little kludge so that empty statements return None from REPLs */
krk_push(NONE_VAL());
krk_pop();
}
krk_callValue(OBJECT_VAL(closure), 0, 1);
KrkValue result = run();