From eea10a67e0bf09c8510e0333b5135aec60a1fb01 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Tue, 10 Dec 2024 01:03:59 +0000 Subject: [PATCH] chore(bin/crc32checker): update for newer ruby versions --- bin/crc32checker | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/crc32checker b/bin/crc32checker index ea1001d..d321267 100755 --- a/bin/crc32checker +++ b/bin/crc32checker @@ -1,14 +1,15 @@ -#! /usr/bin/env ruby +#!/usr/bin/env ruby +# frozen_string_literal: true ARGV.each do |path| print "Checking \"#{path}\"... " - if !File.exists?(path) - puts "FILE NOT FOUND" + unless File.exist?(path) + puts 'FILE NOT FOUND' next end - checksum = `crc32 "#{path}"`.strip.upcase + checksum = `crc32 "#{path}"`.strip.split(' ', 2).first.upcase if File.basename(path).upcase.include?(checksum) puts "MATCH (#{checksum})" else