From 863c0302e3e60c88f27a8f552b4d1a6bfebc86f8 Mon Sep 17 00:00:00 2001 From: Kevin Sylvestre Date: Sun, 1 Mar 2020 14:41:46 -0800 Subject: [PATCH] Delete JSON spec for recursive hashes The `JSON` 2.3.0 gem changed how parsing errors are raised. For example: require 'json' data = {} data['cycle'] = data JSON.dump(data) With json v2.2.0: This raises a `SystemStackError`. With json v2.3.0: This causes `fatal (machine stack overflow in critical region)` Since the specs depend on 'SystemStackError' removing. --- .travis.yml | 1 + spec/raven/json_spec.rb | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index d3cdaa5e2..f678a85b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ rvm: - 2.4.9 - 2.5.7 - 2.6.5 + - 2.7.0 env: - RAILS_VERSION=4 diff --git a/spec/raven/json_spec.rb b/spec/raven/json_spec.rb index 9393fbf27..90aa09f1a 100644 --- a/spec/raven/json_spec.rb +++ b/spec/raven/json_spec.rb @@ -60,20 +60,5 @@ JSON.parse(%({"example": "this is a utf8 or ASCII string"}).encode("US-ASCII")) end.not_to raise_error end - - it "blows up on circular references" do - data = {} - data['data'] = data - data['ary'] = [] - data['ary'].push('x' => data['ary']) - data['ary2'] = data['ary'] - data['leave intact'] = { 'not a circular reference' => true } - - if RUBY_PLATFORM == 'java' - expect { JSON.dump(data) }.to raise_error - else - expect { JSON.dump(data) }.to raise_error(SystemStackError) - end - end end end