Blob Blame History Raw
From f74fd0ecbd521f3d77fb6144f320340ca3da18aa Mon Sep 17 00:00:00 2001
From: Willem van Bergen <willem@vanbergen.org>
Date: Wed, 21 Nov 2018 11:51:29 -0500
Subject: [PATCH 1/2] Fix failing specs by implementing Dimension#hash

---
 lib/chunky_png/dimension.rb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/chunky_png/dimension.rb b/lib/chunky_png/dimension.rb
index 76f7ae2..bb475e8 100644
--- a/lib/chunky_png/dimension.rb
+++ b/lib/chunky_png/dimension.rb
@@ -107,6 +107,12 @@ def eql?(other)
 
     alias_method :==, :eql?
 
+    # Calculates a hash for the dimension object, based on width and height
+    # @return [Integer] A hashed value of the dimensions
+    def hash
+      [width, height].hash
+    end
+
     # Compares the size of 2 dimensions.
     # @param [ChunkyPNG::Dimension] The dimension to compare with.
     # @return [-1, 0, 1] -1 if the other dimension has a larger area, 1 of this

From 315d4a8dc812806969a364c89ff9aaa195fcda52 Mon Sep 17 00:00:00 2001
From: Willem van Bergen <willem@vanbergen.org>
Date: Wed, 21 Nov 2018 11:57:43 -0500
Subject: [PATCH 2/2] Update build matrix

---
 .travis.yml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index edfc0ab..e27bdb9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,8 +3,6 @@ script: bundle exec rake
 sudo: false
 
 rvm:
-- "2.0"
-- "2.1"
 - "2.2"
 - "2.3"
 - "2.4"
@@ -15,4 +13,3 @@ rvm:
 matrix:
   allow_failures:
   - rvm: ruby-head
-  - rvm: "2.5" # Broken on Travis on 2018-01-23