1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00

Use JSON.load to instantiate errors

As of JSON 1.7.7, JSON.parse no longer instantiates json_class as
specified in the source document. JSON.load retains the original
behavior.
This commit is contained in:
Matthew Horan 2013-02-22 22:29:44 -05:00
parent af998e102a
commit 0818831624
2 changed files with 4 additions and 2 deletions

View file

@ -23,7 +23,8 @@ GEM
ffi (~> 1.0, >= 1.0.6)
diff-lcs (1.1.2)
ffi (1.2.0)
json (1.7.6)
ffi (1.2.0-x86-mingw32)
json (1.7.7)
libwebsocket (0.1.7.1)
addressable
websocket
@ -32,6 +33,7 @@ GEM
subexec (~> 0.0.4)
multi_json (1.5.0)
nokogiri (1.5.6)
nokogiri (1.5.6-x86-mingw32)
rack (1.4.1)
rack-test (0.6.2)
rack (>= 1.0)

View file

@ -208,7 +208,7 @@ module Capybara::Webkit
if result.nil?
raise NoResponseError, "No response received from the server."
elsif result != 'ok'
raise JSON.parse(read_response)
raise JSON.load(read_response)
end
result