ruby-changes:59837
From: Koichi <ko1@a...>
Date: Tue, 28 Jan 2020 15:24:45 +0900 (JST)
Subject: [ruby-changes:59837] 4df0819c5d (master): support multi-run for test/ruby/test_settracefunc.rb
https://git.ruby-lang.org/ruby.git/commit/?id=4df0819c5d From 4df0819c5d8b7d11e3fa1d2ba45fe7da68a0e064 Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Tue, 28 Jan 2020 15:15:19 +0900 Subject: support multi-run for test/ruby/test_settracefunc.rb need to remove Constants. diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index ada7b75..73cf625 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -137,6 +137,10 @@ class TestSetTraceFunc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L137 assert_equal(["c-call", 9, :set_trace_func, Kernel], events.shift) assert_equal([], events) + + self.class.class_eval do + remove_const :Foo + end end def test_return # [ruby-dev:38701] @@ -362,6 +366,11 @@ class TestSetTraceFunc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L366 end assert_equal([], events[:set]) assert_equal([], events[:add]) + + # cleanup + self.class.class_eval do + remove_const :ThreadTraceInnerClass + end end def test_trace_defined_method -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/