missing argument to 'assert' raises "assertion failed" error

This commit is contained in:
Roberto Ierusalimschy 2009-03-16 13:30:50 -03:00
parent 9428ec42d0
commit 9e613b8583

View File

@ -1,5 +1,5 @@
/*
** $Id: lbaselib.c,v 1.211 2009/03/10 17:14:37 roberto Exp roberto $
** $Id: lbaselib.c,v 1.212 2009/03/13 15:50:03 roberto Exp roberto $
** Basic library
** See Copyright Notice in lua.h
*/
@ -364,7 +364,6 @@ static int luaB_dofile (lua_State *L) {
static int luaB_assert (lua_State *L) {
luaL_checkany(L, 1);
if (!lua_toboolean(L, 1))
return luaL_error(L, "%s", luaL_optstring(L, 2, "assertion failed!"));
return lua_gettop(L);