diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-09-11 15:33:37 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-09-11 21:32:15 +0000 |
commit | 14a83e0879b8001c180576ff3a211a74288e3b40 (patch) | |
tree | 072662cb753fd1d7502b8b56a95219cfdbfa1050 /lib | |
parent | 203fdd738b0488206c03db9a7a307c170711b5ba (diff) |
[ruby/yarp] Update pretty_print to use inspect
https://github.com/ruby/yarp/commit/c2b9b780c7
Diffstat (limited to 'lib')
-rw-r--r-- | lib/yarp.rb | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/yarp.rb b/lib/yarp.rb index 2442ad3354..b81c988177 100644 --- a/lib/yarp.rb +++ b/lib/yarp.rb @@ -307,20 +307,7 @@ module YARP end def pretty_print(q) - q.group do - q.text(self.class.name.split("::").last) - location.pretty_print(q) - q.text("[Li:#{location.start_line}]") if newline? - q.text("(") - q.nest(2) do - deconstructed = deconstruct_keys([]) - deconstructed.delete(:location) - q.breakable("") - q.seplist(deconstructed, lambda { q.comma_breakable }, :each_value) { |value| q.pp(value) } - end - q.breakable("") - q.text(")") - end + q.text(inspect.chomp) end end |