From fdecdd0cec3331605be887176f37b9c9dbcb045e Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Thu, 27 Dec 2007 10:58:29 -0200
Subject: stand-alone interpreter shows incorrect error message when the
 'message' is a coroutine (already fixed in 5.2)

---
 bugs | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

(limited to 'bugs')

diff --git a/bugs b/bugs
index fe6b2b81..8254da03 100644
--- a/bugs
+++ b/bugs
@@ -1615,6 +1615,27 @@ lapi.c:
 ]],
 }
 
+Bug{
+what = [[stand-alone interpreter shows incorrect error message
+when the "message" is a coroutine]],
+report = [[Patrick Donnelly, on 17/12/2007]],
+since = [[i ]],
+example = [[> error(coroutine.create(function() end))]],
+patch = [[
+lua.c:
+@@ -74,6 +74,8 @@
+ 
+ 
+ static int traceback (lua_State *L) {
++  if (!lua_isstring(L, 1))  /* 'message' not a string? */
++    return 1;  /* keep it intact */
+   lua_getfield(L, LUA_GLOBALSINDEX, "debug");
+   if (!lua_istable(L, -1)) {
+     lua_pop(L, 1);
+
+]],
+}
+
 Bug{
 what = [[ ]],
 report = [[ , on ]],
-- 
cgit v1.2.3-55-g6feb