Skip to content

Commit

Permalink
Merge ac0f304 into 9446d23
Browse files Browse the repository at this point in the history
  • Loading branch information
ggilder committed Jan 10, 2014
2 parents 9446d23 + ac0f304 commit edea1eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/geokit/mappable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ def distance_between_flat(from, to, units)
end

def math_error_classes
error_classes = [Errno::EDOM]

# Ruby 1.9 raises {Math::DomainError}, but it is not defined in Ruby
# 1.8. Backwards-compatibly rescue both errors.
error_classes << Math::DomainError if defined?(Math::DomainError)
[Errno::EDOM].tap do |error_classes|
# Ruby 1.9 raises {Math::DomainError}, but it is not defined in Ruby
# 1.8. Backwards-compatibly rescue both errors.
error_classes << Math::DomainError if defined?(Math::DomainError)
end
end

# Returns heading in degrees (0 is north, 90 is east, 180 is south, etc)
Expand Down

0 comments on commit edea1eb

Please sign in to comment.