[前][次][番号順一覧][スレッド一覧]

ruby-changes:63117

From: Karol <ko1@a...>
Date: Fri, 25 Sep 2020 17:29:12 +0900 (JST)
Subject: [ruby-changes:63117] 0089854fc5 (master): [test] properly 'skip' test on JRuby

https://git.ruby-lang.org/ruby.git/commit/?id=0089854fc5

From 0089854fc5534a3d6e23d0bd0cfce3f864217e16 Mon Sep 17 00:00:00 2001
From: Karol Bucek <self@k...>
Date: Mon, 6 Jul 2020 20:09:50 +0200
Subject: [test] properly 'skip' test on JRuby

an early return still caused ensure to execute,
setting JSON constant to `nil` for later tests!

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 https://github.com/ruby/ruby/blob/trunk/test/json/json_generator_test.rb#L49
   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 https://github.com/ruby/ruby/blob/trunk/test/json/json_generator_test.rb#L75
     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)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]