Skip to content

Commit

Permalink
PC-17819 | Fix Frozen String Error in Ruby 3.1.3 (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
nalakafernando authored Oct 19, 2023
1 parent 45f4fe1 commit 7b5be09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/moonshot/unicode_table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7b5be09

Please sign in to comment.