Passing a String object to pp via IRB::ColorPrinter.pp raises an error if the object implementing #pretty_print(pp) expects the pp.output object to act like an IO object. It raises this error:
NoMethodError: private method `puts' called for "":String> rescued during inspection
Description
Passing a String object to
pp
viaIRB::ColorPrinter.pp
raises an error if the object implementing#pretty_print(pp)
expects thepp.output
object to act like an IO object. It raises this error:Example
TreeStand::Node#pretty_print
(callsio.puts
)