diff options
author | Karol Bucek <self@kares.org> | 2020-07-06 20:09:50 +0200 |
---|---|---|
committer | Karol Bucek <self@kares.org> | 2020-07-07 15:05:09 +0200 |
commit | 1e31f59231d7d31dc58a1e07f228897ddd4b4d7b (patch) | |
tree | 0585b29051f1c763ab9ec188a532776d6b845379 /tests | |
parent | 7e463c7279314c8bf6bb6f36dc56444ea0f9a7a3 (diff) | |
download | json-1e31f59231d7d31dc58a1e07f228897ddd4b4d7b.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 'tests')
-rw-r--r-- | tests/json_generator_test.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/json_generator_test.rb b/tests/json_generator_test.rb index ee19fa5..028f82f 100644 --- a/tests/json_generator_test.rb +++ b/tests/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) |