lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wednesday 16, Siddon Tang wrote:
> I have two Lua files like a.lua and b.lua,
> 
> In the a.lua the souce is :
> 
> --a.lua
> 
> require "b"
> 
> 
> 
> In the b.lua the souce is :
> 
> --b.lua
> 
> function dofunc()   --ok, here I use the incorret lua code, because I don't
> write end, aha.....
> 
> 
> 
> When I use luajit to execute a.lua and the program coredump, but when I use
> the orign lua the program will tell the error message.
> 
> So I think maybe there is some bug when require an incorrect lua file in
> luajit?

What version of LuaJIT are you using?

The latest LuaJIT2 from the git repository return an error:

luajit-2: error loading module 'b' from file './b.lua':
	./b.lua:4: 'end' expected (to close 'function' at line 2) near '<eof>'
stack traceback:
	[C]: ?
	[C]: in function 'require'
	a.lua:1: in main chunk
	[C]: ?

-- 
Robert G. Jakabosky
require"b"
function dofunc()