Skip to content

Commit

Permalink
Merge pull request #23 from chrisroberts/fix/json-load
Browse files Browse the repository at this point in the history
Allow the JSON library to load available variant
  • Loading branch information
trevorrowe committed Apr 6, 2016
2 parents 26f1653 + e231141 commit 94e6706
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/jmespath.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
# Attempt to load the native version if available, not availble
# by default for Ruby 1.9.3.
gem('json', '>= 1.8.1')
require 'json/ext'
require 'json'
rescue Gem::LoadError
# Fallback on the json_pure gem dependency.
gem('json_pure', '>= 1.8.1')
require 'json/pure'
require 'json'
end
end

Expand Down

0 comments on commit 94e6706

Please sign in to comment.