From 7b5be09cd891bd437a8e2da678189720093fa8b4 Mon Sep 17 00:00:00 2001 From: nalakafernando <42430333+nalakafernando@users.noreply.github.com> Date: Thu, 19 Oct 2023 18:12:57 +0530 Subject: [PATCH] PC-17819 | Fix Frozen String Error in Ruby 3.1.3 (#300) --- lib/moonshot/unicode_table.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/moonshot/unicode_table.rb b/lib/moonshot/unicode_table.rb index 813a8820..1ba49c3e 100644 --- a/lib/moonshot/unicode_table.rb +++ b/lib/moonshot/unicode_table.rb @@ -35,12 +35,14 @@ def add_table(table) end def draw(depth = 1, first = true) + space = ' ' + pipe = '|' print first ? '┌' : '├' print '─' * depth - puts ' ' << @name.light_black + puts "#{space}" << @name.light_black @lines = [''] + @lines + [''] @lines.each do |line| - puts '│' << (' ' * depth) << line + puts "#{pipe}" << (' ' * depth) << line end @children.each do |child| child.draw(depth + 1, false)