lua-users home
lua-l archive

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


2018-07-19 1:52 GMT+02:00  <tobias@justdreams.de>:


> I guess I can shorten it to the minimum but it's still clumsy:
>
> local t = setmetatable( {},{__ipairs=function(tbl) return function() return
> nil,nil,true end,tbl,0 end})
>
> local a,b,c = ipairs(t)
> local _,_,_isCompat = a(b,c)

I replied to the first post before reading this one. Here you do have an
example. This example runs perfectly for me in both Lua 5.3 and 5.4.

But maybe it is a simpler case than the one on which you observed
the offending behaviour.