From ec7a0c947fbbda61e9bed6ea8de72ab6dfa30276 Mon Sep 17 00:00:00 2001
From: "Peter M. Goldstein" <peter.m.goldstein@gmail.com>
Date: Tue, 31 Jul 2012 12:35:34 -0700
Subject: [PATCH] One more test change to get JRuby passing in 1.9 mode

---
 test/test_helper.rb | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/test/test_helper.rb b/test/test_helper.rb
index ba48c172..61b1d058 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -273,12 +273,9 @@ class Test::Unit::TestCase
   end
 
   def is_nan_coordinates?(coordinates)
-    if defined?(::Float::NAN)
-      coordinates == ([ Geocoder::Calculations::NAN ] * 2 )
-    else
-      return false unless coordinates.respond_to? :size 
-      coordinates.size == 2 && coordinates[0].nan? && coordinates[1].nan?
-    end
+    return false unless coordinates.respond_to? :size # Should be an array
+    return false unless coordinates.size == 2 # Should have dimension 2
+    coordinates[0].nan? && coordinates[1].nan? # Both coordinates should be NaN
   end
 end
 
-- 
GitLab