diff --git a/lib/yarp.rb b/lib/yarp.rb index 28f0fae0039..ed1bb685c2e 100644 --- a/lib/yarp.rb +++ b/lib/yarp.rb @@ -307,7 +307,10 @@ def slice end def pretty_print(q) - q.text(inspect.chomp) + q.seplist(inspect.chomp.each_line, -> { q.breakable }) do |line| + q.text(line.chomp) + end + q.current_group.break end end