From 7b3473a13a5e06025940cf5858d30b011c215b74 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 26 Jul 2016 12:51:50 +0000 Subject: [PATCH] dtrace: chomp CR * test/dtrace/helper.rb (DTrace::TestCase::READ_PROBES): chomp CR by pty. fix up r55736. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/dtrace/helper.rb | 2 +- test/dtrace/test_method_cache.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/dtrace/helper.rb b/test/dtrace/helper.rb index 22865aac25..1417185537 100644 --- a/test/dtrace/helper.rb +++ b/test/dtrace/helper.rb @@ -32,7 +32,7 @@ module DTrace when /darwin/i READ_PROBES = proc do |cmd| PTY.spawn(*cmd) do |io, _| - break io.readlines + break io.readlines.each {|line| line.sub!(/\r$/, "")} end end end diff --git a/test/dtrace/test_method_cache.rb b/test/dtrace/test_method_cache.rb index 7ecec194b2..a101b5ddec 100644 --- a/test/dtrace/test_method_cache.rb +++ b/test/dtrace/test_method_cache.rb @@ -9,9 +9,9 @@ module DTrace class String; def abc() end end class Object; def abc() end end code - assert_not_includes lines, "String #{rbfile} 1\n" - assert_includes lines, "String #{rbfile} 2\n" - assert_includes lines, "global #{rbfile} 3\n" + assert_not_include lines, "String #{rbfile} 1\n" + assert_include lines, "String #{rbfile} 2\n" + assert_include lines, "global #{rbfile} 3\n" end end