From 3ff9c5335d8c397c2257a4e59c49ad095074b73e Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Tue, 17 Jul 2018 00:31:19 +0200 Subject: [PATCH] Canonicalize `input` in `initialize`. --- Library/Homebrew/cask/lib/hbc/system_command.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/system_command.rb b/Library/Homebrew/cask/lib/hbc/system_command.rb index a46ce662f9..0bbbd4275c 100644 --- a/Library/Homebrew/cask/lib/hbc/system_command.rb +++ b/Library/Homebrew/cask/lib/hbc/system_command.rb @@ -41,7 +41,7 @@ module Hbc @executable = executable @args = args @sudo = sudo - @input = input + @input = [*input] @print_stdout = print_stdout @print_stderr = print_stderr @must_succeed = must_succeed @@ -116,7 +116,7 @@ module Hbc end def write_input_to(raw_stdin) - [*input].each(&raw_stdin.method(:print)) + input.each(&raw_stdin.method(:write)) end def each_line_from(sources)