diff options
author | Karol Bucek <self@kares.org> | 2020-07-06 20:09:50 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-09-25 17:28:42 +0900 |
commit | 0089854fc5534a3d6e23d0bd0cfce3f864217e16 (patch) | |
tree | e0d315a11f899bef6feed14104a732548e87aee8 /test | |
parent | f8d43e53708206605130f60b52d1dadbc9502297 (diff) | |
download | ruby-0089854fc5534a3d6e23d0bd0cfce3f864217e16.tar.gz |
[test] properly 'skip' test on JRuby
an early return still caused ensure to execute,
setting JSON constant to `nil` for later tests!
Diffstat (limited to 'test')
-rwxr-xr-x | test/json/json_generator_test.rb | 3 |
1 files changed, 1 insertions, 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) |