Skip to content
Snippets Groups Projects
Commit 5fb4ec9b authored by Michael Irwin's avatar Michael Irwin
Browse files

Fixes version check for Ruby 2.0.0

parent a35940bf
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,8 @@ module Geocoder::Store ...@@ -24,7 +24,8 @@ module Geocoder::Store
# Use BSON::OrderedHash if Ruby's hashes are unordered. # Use BSON::OrderedHash if Ruby's hashes are unordered.
# Conditions must be in order required by indexes (see mongo gem). # Conditions must be in order required by indexes (see mongo gem).
empty = RUBY_VERSION.split('.')[1].to_i < 9 ? BSON::OrderedHash.new : {} version = RUBY_VERSION.split('.').map { |i| i.to_i }
empty = version[0] < 2 && version[1] < 9 ? BSON::OrderedHash.new : {}
conds = empty.clone conds = empty.clone
field = geocoder_options[:coordinates] field = geocoder_options[:coordinates]
......
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