From ea4dc392d7fb071d7b23941ce30ee10c7cd2916c Mon Sep 17 00:00:00 2001 From: Airat Makhmutov Date: Wed, 28 Aug 2024 02:03:49 +0300 Subject: [PATCH] fix: Use built-in bitwise operations under lua 5.4 (#112) (#113) --- src/luacheck/vendor/sha1/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/luacheck/vendor/sha1/init.lua b/src/luacheck/vendor/sha1/init.lua index d85db689..3d3e7263 100644 --- a/src/luacheck/vendor/sha1/init.lua +++ b/src/luacheck/vendor/sha1/init.lua @@ -39,7 +39,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.]] sha1.version = "0.6.0" local function choose_ops() - if _VERSION:find("5%.3") then + if tonumber(_VERSION:match"%d+%.%d+") >= 5.3 then return "lua53_ops" elseif pcall(require, "bit") then return "bit_ops"