AS Json parse_error makes a return for backwards compatibility, although it will return MultiJson::DecodeError
This commit is contained in:
parent
e019587e31
commit
1d8be7bc6f
|
@ -34,6 +34,10 @@ module ActiveSupport
|
|||
self.backend = old_backend
|
||||
end
|
||||
|
||||
def parse_error
|
||||
MultiJson::DecodeError
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def convert_dates_from(data)
|
||||
|
|
|
@ -82,7 +82,7 @@ class TestJSONDecoding < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
def test_failed_json_decoding
|
||||
assert_raise(MultiJson::DecodeError) { ActiveSupport::JSON.decode(%({: 1})) }
|
||||
assert_raise(ActiveSupport::JSON.parse_error) { ActiveSupport::JSON.decode(%({: 1})) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue