lib/json-schema/validator.rb in json-schema-1.0.6 vs lib/json-schema/validator.rb in json-schema-1.0.7
- old
+ new
@@ -432,9 +432,17 @@
end
require 'json'
@@available_json_backends << 'json'
@@json_backend = 'json'
end
+
+ # Try force-loading json for rubies > 1.9.2
+ begin
+ require 'json'
+ @@available_json_backends << 'json'
+ @@json_backend = 'json'
+ rescue LoadError
+ end
if begin
Gem::Specification::find_by_name('yajl-ruby')
rescue Gem::LoadError
false