ruby-changes:59864
From: Koichi <ko1@a...>
Date: Wed, 29 Jan 2020 01:27:54 +0900 (JST)
Subject: [ruby-changes:59864] 534536c7cc (master): fix test cleanup.
https://git.ruby-lang.org/ruby.git/commit/?id=534536c7cc From 534536c7cc69970fead43df048d55efe518a03f3 Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Wed, 29 Jan 2020 01:26:51 +0900 Subject: fix test cleanup. should remove pathname. diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 086f250..9d7ffd8 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -974,10 +974,12 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| https://github.com/ruby/ruby/blob/trunk/test/ruby/test_exception.rb#L974 t.puts "require '#{basename}'" t.close $LOAD_PATH.push(File.dirname(t)) - warning = capture_warning_warn {require basename} + warning = capture_warning_warn { + assert require(basename) + } ensure $LOAD_PATH.pop - $LOADED_FEATURES.delete(t) + $LOADED_FEATURES.delete(t.path) end assert_equal(1, warning.size) assert_match(/circular require/, warning.first) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/