[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: luasocket testclnt.lua fails assertion
- From: "robert@..." <robert@...>
- Date: Tue, 29 May 2007 13:37:17 -0600
Hello,
I'm new to Lua.
I've installed Lua 5.1 (on CentOS 4, a Redhat derivative)
and compiled and installed luasockets (i.e. downloaded the
tar ball, edited the config file to adjust paths, and
executed make and make install, and then created symbolic
links for socket.so and mime.so because make install did not;
more on that in a separate message).
When I execute lua testsrvr.lua, it says that it's
waiting for connections. So far so good.
When I execute lua testclnt.lua, it barfs out an error message:
----------------------------------------------
LuaSocket Test Procedures
----------------------------------------------
attempting control connection...
connected!
----------------------------------------------
testing: method registration
----------------------------------------------
lua: ../test/testclnt.lua:104: attempt to call a table value
stack traceback:
../test/testclnt.lua:104: in function 'test_methods'
../test/testclnt.lua:504: in main chunk
[C]: ?
The code in question is:
function test_methods(sock, methods)
for _, v in methods do
if type(sock[v]) ~= "function" then
fail(sock.class .. " method '" .. v .. "' not registered")
end
end
pass(sock.class .. " methods are ok")
end
I don't know enough about Lua to see what's wrong
with the for-loop above, or to guess a workaround.
Any light you can shed on this problem is much appreciated.
Robert Dodier