[test] properly 'skip' test on JRuby

an early return still caused ensure to execute,
setting JSON constant to `nil` for later tests!
This commit is contained in:
Karol Bucek 2020-07-06 20:09:50 +02:00 committed by Hiroshi SHIBATA
parent f8d43e5370
commit 0089854fc5
Notes: git 2020-09-25 17:29:12 +09:00

View File

@ -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)