summaryrefslogtreecommitdiff
path: root/test/json
diff options
context:
space:
mode:
authorKarol Bucek <self@kares.org>2020-07-06 20:09:50 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-25 17:28:42 +0900
commit0089854fc5534a3d6e23d0bd0cfce3f864217e16 (patch)
treee0d315a11f899bef6feed14104a732548e87aee8 /test/json
parentf8d43e53708206605130f60b52d1dadbc9502297 (diff)
[test] properly 'skip' test on JRuby
an early return still caused ensure to execute, setting JSON constant to `nil` for later tests!
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3581
Diffstat (limited to 'test/json')
-rwxr-xr-xtest/json/json_generator_test.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb
index 13d3b5a..77b539d 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)