lua-users home
lua-l archive

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

Is there a way of finding the version of Lua one is running? The obvious way
to overcome the bug (if that's what it is) in tinsert that I just pointed
out is to write a wrapper:

function tinsert(t, n, v)
  %tinsert(t, n, v)

which does the adjustment that the C implementation doesn't do correctly.
I've put this in my standard library, util.lua, but it'd be nice if it was
only loaded for versions of Lua that need it, i.e. I could surround it with

if _VERSION < 4.1 then

BTW, the tinsert bug appears to be present in 4.1alpha too.

-- | art, n.  romanticized mundanity