From c6cd4206df516da1c6b1935f045e22e0ef7f0709 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 5 Feb 2020 08:47:47 +0900 Subject: [PATCH] Get rid of nested string interpolations to be editor-friendly --- tool/lib/test/unit/core_assertions.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tool/lib/test/unit/core_assertions.rb b/tool/lib/test/unit/core_assertions.rb index 8911fadae3..aa5c7d618d 100644 --- a/tool/lib/test/unit/core_assertions.rb +++ b/tool/lib/test/unit/core_assertions.rb @@ -110,14 +110,16 @@ module Test file ||= loc.path line ||= loc.lineno end - if /mswin|mingw/ !~ RUBY_PLATFORM + if /mswin|mingw/ =~ RUBY_PLATFORM + res_out = "STDOUT" + else res_p, res_c = IO.pipe opt[res_c.fileno] = res_c.fileno - res_fd = res_c.fileno + res_out = "IO.new(#{res_c.fileno}, 'w')" end src = <