lua-users home
lua-l archive

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

Dirk Laurie wrote:
On Thu, Jan 06, 2011 at 07:56:58AM +0200, Miles Bader wrote:
Lorenzo Donati <> writes:
First step: what's the best way to detect one is running in 5.2?

I can do:

   local lua_52 = string.match(_VERSION, " 5[.]2$")

but my impression is that such version-string matching is often thought
of as being not-so-good (e.g., the above will fail in 5.3 or 6.0, even
though they're likely to be more like 5.2 than 5.1).

Just for the archives: the quotation is wrong here.

The quotation above is from a message from Miles Bader who replied to me by private mail (maybe to a misconfiguration of his mailer program, because it appears that Dirk got his message too, but I didn't receive that message as part of this thread)