diff options
author | Dude112113 <curtisdude12@gmail.com> | 2019-09-09 18:25:01 +0100 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2019-09-09 14:25:01 -0300 |
commit | 15d97c6d5c4e1acade2f983adb507e266b87aa93 (patch) | |
tree | 61410cfa796e61e7bceb6af68e1f4c642f1c96a6 | |
parent | 83093e7da7f789f0f7d3a6784597cbbed09c73e0 (diff) | |
download | luarocks-15d97c6d5c4e1acade2f983adb507e266b87aa93.tar.gz luarocks-15d97c6d5c4e1acade2f983adb507e266b87aa93.tar.bz2 luarocks-15d97c6d5c4e1acade2f983adb507e266b87aa93.zip |
vers: add extra metamethod needed by Lua 5.4 (#1088)
-rw-r--r-- | src/luarocks/core/vers.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/luarocks/core/vers.lua b/src/luarocks/core/vers.lua index c8c66a1f..e680f70b 100644 --- a/src/luarocks/core/vers.lua +++ b/src/luarocks/core/vers.lua | |||
@@ -56,6 +56,12 @@ local version_mt = { | |||
56 | end | 56 | end |
57 | return false | 57 | return false |
58 | end, | 58 | end, |
59 | -- @param v1 table: version table to compare. | ||
60 | -- @param v2 table: version table to compare. | ||
61 | -- @return boolean: true if v1 is considered lower than or equal to v2. | ||
62 | __le = function(v1, v2) | ||
63 | return not (v2 < v1) | ||
64 | end, | ||
59 | --- Return version as a string. | 65 | --- Return version as a string. |
60 | -- @param v The version table. | 66 | -- @param v The version table. |
61 | -- @return The string representation. | 67 | -- @return The string representation. |