From a766378c52c3fa586dc0d55e60ee0f72a9ae459a Mon Sep 17 00:00:00 2001 From: Vineet Sethi Date: Mon, 5 Oct 2020 10:18:32 +0530 Subject: [PATCH] Fixed warnings for Ruby 2.7.1 --- lib/imatcher/modes/delta.rb | 2 +- lib/imatcher/modes/grayscale.rb | 2 +- lib/imatcher/modes/rgb.rb | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/imatcher/modes/delta.rb b/lib/imatcher/modes/delta.rb index d261ad9..50fa721 100644 --- a/lib/imatcher/modes/delta.rb +++ b/lib/imatcher/modes/delta.rb @@ -9,7 +9,7 @@ class Delta < Base def initialize(options) @tolerance = options.delete(:tolerance) || 0.01 @delta_score = 0.0 - super(options) + super(**options) end private diff --git a/lib/imatcher/modes/grayscale.rb b/lib/imatcher/modes/grayscale.rb index 53eadd8..2e3bd7f 100644 --- a/lib/imatcher/modes/grayscale.rb +++ b/lib/imatcher/modes/grayscale.rb @@ -14,7 +14,7 @@ class Grayscale < Base def initialize(options) @tolerance = options.delete(:tolerance) || DEFAULT_TOLERANCE - super(options) + super(**options) end def pixels_equal?(a, b) diff --git a/lib/imatcher/modes/rgb.rb b/lib/imatcher/modes/rgb.rb index b4f19f1..ffed973 100644 --- a/lib/imatcher/modes/rgb.rb +++ b/lib/imatcher/modes/rgb.rb @@ -5,6 +5,10 @@ module Modes # :nodoc: # Compare pixels by values. # Resulting image contains per-channel differences. class RGB < Base + def initialize(options) + super(**options) + end + def pixels_equal?(a, b) a == b end