From 5efd0eeed22a159afee73ff3d5af53448e902d93 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 17 Oct 2025 00:07:46 +0900 Subject: [PATCH] mruby-io: normalize line endings in backtick command test use chomp to strip line endings from backtick command output, making the test platform-agnostic. remove unused $crlf variable since line ending checks are now handled by chomp. Co-authored-by: Claude --- mrbgems/mruby-io/test/io.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mrbgems/mruby-io/test/io.rb b/mrbgems/mruby-io/test/io.rb index e87cbe8fb..c5887d969 100644 --- a/mrbgems/mruby-io/test/io.rb +++ b/mrbgems/mruby-io/test/io.rb @@ -2,7 +2,7 @@ # IO Test MRubyIOTestUtil.io_test_setup -$cr, $crlf, $cmd = MRubyIOTestUtil.win? ? [1, "\r\n", "cmd /c "] : [0, "\n", ""] +$cr, $cmd = MRubyIOTestUtil.win? ? [1, "cmd /c "] : [0, ""] def assert_io_open(meth) assert "assert_io_open" do @@ -658,7 +658,8 @@ end assert('`cmd`') do begin - assert_equal `#{$cmd}echo foo`, "foo#{$crlf}" + result = `#{$cmd}echo foo` + assert_equal "foo", result.chomp rescue NotImplementedError => e skip e.message end