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

Merge pull request #403 from mdi/master

Fixes version check for Ruby 2.0.0
parents a35940bf 5fb4ec9b
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,8 @@ module Geocoder::Store
# Use BSON::OrderedHash if Ruby's hashes are unordered.
# 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
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