[Groonga-commit] ranguba/rroonga at eafa053 [master] Fix a typo in Groonga::GeoPoint#==

Back to archive index

Masafumi Yokoyama null+****@clear*****
Tue Dec 30 19:33:49 JST 2014


Masafumi Yokoyama	2014-12-30 19:33:49 +0900 (Tue, 30 Dec 2014)

  New Revision: eafa0533f9ac9bf998507d26e810d16bbee1662d
  https://github.com/ranguba/rroonga/commit/eafa0533f9ac9bf998507d26e810d16bbee1662d

  Message:
    Fix a typo in Groonga::GeoPoint#==
    
    otehr ->
    other
      ^^

  Modified files:
    lib/groonga/geo-point.rb
    test/test-geo-point.rb

  Modified: lib/groonga/geo-point.rb (+2 -1)
===================================================================
--- lib/groonga/geo-point.rb    2014-12-30 15:59:23 +0900 (e037024)
+++ lib/groonga/geo-point.rb    2014-12-30 19:33:49 +0900 (2090696)
@@ -1,6 +1,7 @@
 # -*- coding: utf-8 -*-
 #
 # Copyright (C) 2012  Kouhei Sutou <kou �� clear-code.com>
+# Copyright (C) 2014  Masafumi Yokoyama <myokoym �� gmail.com>
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -136,7 +137,7 @@ module Groonga
     def ==(other)
       case other
       when String
-        to_s == otehr
+        to_s == other
       when GeoPoint
         normalized_self = to_msec
         normalized_other = coerce(other).to_msec

  Modified: test/test-geo-point.rb (+15 -0)
===================================================================
--- test/test-geo-point.rb    2014-12-30 15:59:23 +0900 (46da646)
+++ test/test-geo-point.rb    2014-12-30 19:33:49 +0900 (ac7b152)
@@ -1,4 +1,5 @@
 # Copyright (C) 2012  Kouhei Sutou <kou �� clear-code.com>
+# Copyright (C) 2014  Masafumi Yokoyama <myokoym �� gmail.com>
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -185,6 +186,20 @@ class GeoPointTest < Test::Unit::TestCase
           assert_equal(geo_point1, geo_point2)
         end
       end
+
+      class StringTest < self
+        def test_degree
+          geo_point1 = Groonga::WGS84GeoPoint.new(35.6846084, 139.7628746)
+          geo_point2 = "35.6846084x139.7628746"
+          assert_equal(geo_point1, geo_point2)
+        end
+
+        def test_msec
+          geo_point1 = Groonga::WGS84GeoPoint.new(128464590, 503146349)
+          geo_point2 = "128464590x503146349"
+          assert_equal(geo_point1, geo_point2)
+        end
+      end
     end
   end
 end
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-commit mailing list
Back to archive index