mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 03:24:00 +02:00
[ruby/yarp] Better Node#pretty_print
Respect the current indentation
068333ef49
This commit is contained in:
parent
a71001d341
commit
4da53fd3a7
1 changed files with 4 additions and 1 deletions
|
@ -307,7 +307,10 @@ module YARP
|
|||
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue