File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed
Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change 44
55module IRB
66 class ColorPrinter < ::PP
7- METHOD_RESPOND_TO = Object . instance_method ( :respond_to? )
8- METHOD_INSPECT = Object . instance_method ( :inspect )
9-
107 class << self
118 def pp ( obj , out = $>, width = screen_width )
129 q = ColorPrinter . new ( out , width )
@@ -28,8 +25,6 @@ def pp(obj)
2825 if String === obj
2926 # Avoid calling Ruby 2.4+ String#pretty_print that splits a string by "\n"
3027 text ( obj . inspect )
31- elsif !METHOD_RESPOND_TO . bind ( obj ) . call ( :inspect )
32- text ( METHOD_INSPECT . bind ( obj ) . call )
3328 else
3429 super
3530 end
Original file line number Diff line number Diff line change @@ -42,4 +42,5 @@ Gem::Specification.new do |spec|
4242
4343 spec . add_dependency "reline" , ">= 0.4.2"
4444 spec . add_dependency "rdoc" , ">= 4.0.0"
45+ spec . add_dependency "pp" , ">= 0.6.0"
4546end
You can’t perform that action at this time.
0 commit comments