From 027e312f309d844ebbd9edefba27c7cefc116a09 Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Sun, 17 Feb 2019 04:37:12 +0000 Subject: [PATCH] Allow print_more to print Array --- core/ruby/print.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/ruby/print.rb b/core/ruby/print.rb index 2582f72a2..f1ee1e9a2 100644 --- a/core/ruby/print.rb +++ b/core/ruby/print.rb @@ -55,7 +55,12 @@ end # @note The string passed needs to be separated by the "\n" for multiple lines to be printed def print_more(s) time = Time.now.localtime.strftime("[%k:%M:%S]") - lines = s.split("\n") + + if s.class == Array + lines = s + else + lines = s.split("\n") + end lines.each_with_index do |line, index| if ((index+1) == lines.size)