Skip to content

Commit

Permalink
fix: Use built-in bitwise operations under lua 5.4 (#112) (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
rautyrauty authored Aug 27, 2024
1 parent a82a9c1 commit ea4dc39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/luacheck/vendor/sha1/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ea4dc39

Please sign in to comment.