Skip to content

Commit c2b9b78

Browse files
committed
Update pretty_print to use inspect
1 parent 6d40435 commit c2b9b78

File tree

912 files changed

+75467
-58574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

912 files changed

+75467
-58574
lines changed

lib/yarp.rb

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -307,20 +307,7 @@ def slice
307307
end
308308

309309
def pretty_print(q)
310-
q.group do
311-
q.text(self.class.name.split("::").last)
312-
location.pretty_print(q)
313-
q.text("[Li:#{location.start_line}]") if newline?
314-
q.text("(")
315-
q.nest(2) do
316-
deconstructed = deconstruct_keys([])
317-
deconstructed.delete(:location)
318-
q.breakable("")
319-
q.seplist(deconstructed, lambda { q.comma_breakable }, :each_value) { |value| q.pp(value) }
320-
end
321-
q.breakable("")
322-
q.text(")")
323-
end
310+
q.text(inspect.chomp)
324311
end
325312
end
326313

test/yarp/snapshots/alias.txt

Lines changed: 171 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)