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

ruby-changes:74270

From: Nobuyoshi <ko1@a...>
Date: Thu, 27 Oct 2022 12:12:20 +0900 (JST)
Subject: [ruby-changes:74270] cb80ee7a4a (master): [ruby/tmpdir] Warnings should contain the environment variable name

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

From cb80ee7a4a3967be3a0ce687ec76522f1680600b Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 26 Oct 2022 21:20:17 +0900
Subject: [ruby/tmpdir] Warnings should contain the environment variable name

---
 test/test_tmpdir.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/test_tmpdir.rb b/test/test_tmpdir.rb
index 1adb6a70b7..eada416f6f 100644
--- a/test/test_tmpdir.rb
+++ b/test/test_tmpdir.rb
@@ -23,14 +23,14 @@ class TestTmpdir < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_tmpdir.rb#L23
           ENV[e] = tmpdirx
           assert_not_equal(tmpdirx, assert_warn('') {Dir.tmpdir})
           File.write(tmpdirx, "")
-          assert_not_equal(tmpdirx, assert_warn(/not a directory/) {Dir.tmpdir})
+          assert_not_equal(tmpdirx, assert_warn(/\A#{e} is not a directory/) {Dir.tmpdir})
           File.unlink(tmpdirx)
           ENV[e] = tmpdir
           assert_equal(tmpdir, Dir.tmpdir)
           File.chmod(0555, tmpdir)
-          assert_not_equal(tmpdir, assert_warn(/not writable/) {Dir.tmpdir})
+          assert_not_equal(tmpdir, assert_warn(/\A#{e} is not writable/) {Dir.tmpdir})
           File.chmod(0777, tmpdir)
-          assert_not_equal(tmpdir, assert_warn(/world-writable/) {Dir.tmpdir})
+          assert_not_equal(tmpdir, assert_warn(/\A#{e} is world-writable/) {Dir.tmpdir})
           newdir = Dir.mktmpdir("d", tmpdir) do |dir|
             assert_file.directory? dir
             assert_equal(tmpdir, File.dirname(dir))
-- 
cgit v1.2.3


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

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