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:
parent
af998e102a
commit
0818831624
2 changed files with 4 additions and 2 deletions
|
@ -23,7 +23,8 @@ GEM
|
||||||
ffi (~> 1.0, >= 1.0.6)
|
ffi (~> 1.0, >= 1.0.6)
|
||||||
diff-lcs (1.1.2)
|
diff-lcs (1.1.2)
|
||||||
ffi (1.2.0)
|
ffi (1.2.0)
|
||||||
json (1.7.6)
|
ffi (1.2.0-x86-mingw32)
|
||||||
|
json (1.7.7)
|
||||||
libwebsocket (0.1.7.1)
|
libwebsocket (0.1.7.1)
|
||||||
addressable
|
addressable
|
||||||
websocket
|
websocket
|
||||||
|
@ -32,6 +33,7 @@ GEM
|
||||||
subexec (~> 0.0.4)
|
subexec (~> 0.0.4)
|
||||||
multi_json (1.5.0)
|
multi_json (1.5.0)
|
||||||
nokogiri (1.5.6)
|
nokogiri (1.5.6)
|
||||||
|
nokogiri (1.5.6-x86-mingw32)
|
||||||
rack (1.4.1)
|
rack (1.4.1)
|
||||||
rack-test (0.6.2)
|
rack-test (0.6.2)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
|
|
|
@ -208,7 +208,7 @@ module Capybara::Webkit
|
||||||
if result.nil?
|
if result.nil?
|
||||||
raise NoResponseError, "No response received from the server."
|
raise NoResponseError, "No response received from the server."
|
||||||
elsif result != 'ok'
|
elsif result != 'ok'
|
||||||
raise JSON.parse(read_response)
|
raise JSON.load(read_response)
|
||||||
end
|
end
|
||||||
|
|
||||||
result
|
result
|
||||||
|
|
Loading…
Reference in a new issue