lib/licensee/matchers/copyright.rb in licensee-9.2.1 vs lib/licensee/matchers/copyright.rb in licensee-9.3.0
- old
+ new
@@ -1,7 +1,5 @@
-# encoding: UTF-8
-
module Licensee
module Matchers
class Copyright < Licensee::Matchers::Matcher
attr_reader :file
@@ -13,10 +11,10 @@
def match
# Note: must use content, and not content_normalized here
if @file.content.strip =~ /\A#{REGEX}\z/i
Licensee::License.find('no-license')
end
- rescue
+ rescue Encoding::CompatibilityError
nil
end
def confidence
100