From 6b45ccf4ed24dcfe437cf0159d6185119a2e8f95 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 5 Jul 2024 15:19:11 -0300
Subject: Removed compatibility with "= exp" in the REPL

---
 lua.c           | 5 +----
 testes/main.lua | 2 +-
 2 files changed, 2 insertions(+), 5 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) {
   l = strlen(b);
   if (l > 0 && b[l-1] == '\n')  /* line ends with newline? */
     b[--l] = '\0';  /* remove it */
-  if (firstline && b[0] == '=')  /* for compatibility with 5.2, ... */
-    lua_pushfstring(L, "return %s", b + 1);  /* change '=' to 'return' */
-  else
-    lua_pushlstring(L, b, l);
+  lua_pushlstring(L, b, l);
   lua_freeline(b);
   return 1;
 }
diff --git a/testes/main.lua b/testes/main.lua
index 17fbcb61..7b0f4ee0 100644
--- a/testes/main.lua
+++ b/testes/main.lua
@@ -345,7 +345,7 @@ a]]
 RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
 checkprogout("6\n10\n10\n\n")
 
-prepfile("a = [[b\nc\nd\ne]]\n=a")
+prepfile("a = [[b\nc\nd\ne]]\na")
 RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
 checkprogout("b\nc\nd\ne\n\n")
 
-- 
cgit v1.2.3-55-g6feb