From 0089854fc5534a3d6e23d0bd0cfce3f864217e16 Mon Sep 17 00:00:00 2001 From: Karol Bucek Date: Mon, 6 Jul 2020 20:09:50 +0200 Subject: [PATCH] [test] properly 'skip' test on JRuby an early return still caused ensure to execute, setting JSON constant to `nil` for later tests! --- test/json/json_generator_test.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb index 13d3b5ab91..77b539dc3f 100755 --- a/test/json/json_generator_test.rb +++ b/test/json/json_generator_test.rb @@ -49,7 +49,6 @@ EOT end def test_remove_const_segv - return if RUBY_ENGINE == 'jruby' stress = GC.stress const = JSON::SAFE_STATE_PROTOTYPE.dup @@ -76,7 +75,7 @@ EOT silence do JSON.const_set :SAFE_STATE_PROTOTYPE, const end - end if JSON.const_defined?("Ext") + end if JSON.const_defined?("Ext") && RUBY_ENGINE != 'jruby' def test_generate json = generate(@hash)