aboutsummaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-07-05 15:19:11 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-07-05 15:19:11 -0300
commit6b45ccf4ed24dcfe437cf0159d6185119a2e8f95 (patch)
tree83f0122940fcd8c3f5594172d7ae4a37a737d408 /lua.c
parent93fd6892f85ecd8a4e82d2339016a9f71a42d0e8 (diff)
downloadlua-6b45ccf4ed24dcfe437cf0159d6185119a2e8f95.tar.gz
lua-6b45ccf4ed24dcfe437cf0159d6185119a2e8f95.tar.bz2
lua-6b45ccf4ed24dcfe437cf0159d6185119a2e8f95.zip
Removed compatibility with "= exp" in the REPL
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lua.c b/lua.c
index bff6a8f5..3d807c98 100644
--- a/lua.c
+++ b/lua.c
@@ -565,10 +565,7 @@ static int pushline (lua_State *L, int firstline) {
565 l = strlen(b); 565 l = strlen(b);
566 if (l > 0 && b[l-1] == '\n') /* line ends with newline? */ 566 if (l > 0 && b[l-1] == '\n') /* line ends with newline? */
567 b[--l] = '\0'; /* remove it */ 567 b[--l] = '\0'; /* remove it */
568 if (firstline && b[0] == '=') /* for compatibility with 5.2, ... */ 568 lua_pushlstring(L, b, l);
569 lua_pushfstring(L, "return %s", b + 1); /* change '=' to 'return' */
570 else
571 lua_pushlstring(L, b, l);
572 lua_freeline(b); 569 lua_freeline(b);
573 return 1; 570 return 1;
574} 571}