Skip to content
Snippets Groups Projects
Commit 1c5b47e4 authored by Alex Reisner's avatar Alex Reisner
Browse files

Fix Ruby 1.8 syntax errors.

parent 9240e818
No related branches found
No related tags found
No related merge requests found
......@@ -162,7 +162,7 @@ module Geocoder::Orm
default_near_scope_options(latitude, longitude, radius, options).merge(
:select => "#{options[:select] || '*'}, " +
"#{distance} AS distance" +
(bearing ? ", #{bearing} AS bearing" : ""),
(bearing ? ", #{bearing} AS bearing" : "")
)
end
......
......@@ -232,7 +232,8 @@ class GeocoderTest < Test::Unit::TestCase
p1 = points[d]
p2 = points[opp]
b = Geocoder::Calculations.bearing_between(*(p1 + p2), :method => m)
args = p1 + p2 + [:method => m]
b = Geocoder::Calculations.bearing_between(*args)
assert (b - bearings[opp]).abs < 1,
"Bearing (#{m}) should be close to #{bearings[opp]} but was #{b}."
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment