lua-users home
lua-l archive

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



Peter Aronoff <telemachus@arpinum.org>于2017年3月4日 周六上午2:01写道:
Peter Melnichenko <mpeterval@gmail.com> wrote:
> I've released Luacheck 0.19.0.

Thanks!

A quick question, and I apologize because I don’t recall if this was an
issue before or it’s new. Like a lot of people, I now use this in modules
that require unpack:

        local unpack = unpack or table.unpack

That, however, yields this warning from luacheck:

        src/tapered.lua:9:16: accessing undefined variable unpack

I get what’s happening here, and I can simply choose to ignore this
warning, but I wonder if people have any thoughts about how else to handle
a cross-lua module that uses unpack.

Thanks, Peter
--
We have not been faced with the need to satisfy someone else's
requirements, and for this freedom we are grateful.
    Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System

I used to write it as 
local unpack = _G.unpack or table.unpack

But it maybe can not work in this new version...
--
regards,
Xavier Wang.