Submitted by ahoward (Fri Feb 13 13:02:53 UTC 2004)
raise ArgumentError, very_large_hash.inspect
s = ''
PP::pp very_large_hash, s
raise ArgumentError, s
class Object
def pretty s = ''<br>
autoload :PP, 'pp'<br>
PP::pp self, s<br>
s<br>
end<br>
end
Comments | Current voting | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
This RCR supersedes RCR 214.
RCRchive copyright © David Alan Black, 2003-2005.
Powered by .
This isn't needed, really.
Since PP.pp(obj, out) returns out,
can be described as:
Note that pretty_print_inspect doesn't solve the problem because it is designed to use as inspect using pretty_print.