diff options
-rw-r--r-- | test/fileutils/test_fileutils.rb | 19 | ||||
-rw-r--r-- | version.h | 2 |
2 files changed, 17 insertions, 4 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 295fbfd960..5d029c919c 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -17,8 +17,11 @@ class TestFileUtils < Test::Unit::TestCase fu.instance_variable_set(:@fileutils_output, write) th = Thread.new { read.read } th2 = Thread.new { - yield - write.close + begin + yield + ensure + write.close + end } th_value, _ = assert_join_threads([th, th2]) lines = th_value.lines.map {|l| l.chomp } @@ -136,7 +139,7 @@ class TestFileUtils < Test::Unit::TestCase def setup @prevdir = Dir.pwd - @groups = Process.groups if have_file_perm? + @groups = [Process.gid] | Process.groups if have_file_perm? tmproot = TMPROOT mymkdir tmproot unless File.directory?(tmproot) Dir.chdir tmproot @@ -208,6 +211,16 @@ class TestFileUtils < Test::Unit::TestCase # Test Cases # + def test_assert_output_lines + assert_raise(MiniTest::Assertion) { + Timeout.timeout(0.1) { + assert_output_lines([]) { + raise "ok" + } + } + } + end + def test_pwd check_singleton :pwd @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.2.7" #define RUBY_RELEASE_DATE "2016-12-27" -#define RUBY_PATCHLEVEL 413 +#define RUBY_PATCHLEVEL 414 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 12 |