diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb index 460ad08233..da8c3f26b1 100644 --- a/lib/net/smtp.rb +++ b/lib/net/smtp.rb @@ -1042,7 +1042,7 @@ module Net return {} unless @string[3, 1] == '-' h = {} @string.lines.drop(1).each do |line| - k, *v = line[4..-1].chomp.split + k, *v = line[4..-1].split h[k] = v end h diff --git a/spec/mspec/tool/sync/sync-rubyspec.rb b/spec/mspec/tool/sync/sync-rubyspec.rb index 72572e2eb2..c1218bb02c 100644 --- a/spec/mspec/tool/sync/sync-rubyspec.rb +++ b/spec/mspec/tool/sync/sync-rubyspec.rb @@ -135,7 +135,7 @@ def rebase_commits(impl) else last_merge = `git log --grep='^#{impl.last_merge_message}' -n 1 --format='%H %ct'` end - last_merge, commit_timestamp = last_merge.chomp.split(' ') + last_merge, commit_timestamp = last_merge.split(' ') raise "Could not find last merge" unless last_merge puts "Last merge is #{last_merge}" diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 53599a6318..a5eb0a5844 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -2381,7 +2381,7 @@ EOS end w.close assert_equal "exec failed\n", r.gets - vals = r.gets.chomp.split.map!(&:to_i) + vals = r.gets.split.map!(&:to_i) assert_operator vals[0], :>, vals[1], vals.inspect _, status = Process.waitpid2(pid) end