raise SomeError, “object was <#{ object.inspect }>”
and similar
what would be the eqiv methods using pretty_print? i would like to do
something like
raise SomeError, “object was <#{ object.pretty_print_inspect }>”
but that obviously does not work.
what i am after is a method on object, or that takes an object, which returns
as a string the output that pp(object) would have produced. i know i can do
PP.pp(obj, port) but am looking for something shorter…
-a
···
–
ATTN: please update your address books with address below!
The difference between art and science is that science is what we
understand well enough to explain to a computer.
Art is everything else.
– Donald Knuth, “Discover”
/bin/sh -c ‘for l in ruby perl;do $l -e “print "\x3a\x2d\x29\x0a"”;done’
===============================================================================
Not a great name, perhaps; I just picked it up somewhere and liked the
idea.
Gavin
···
On Friday, February 13, 2004, 3:05:01 AM, Ara.T.Howard wrote:
what i am after is a method on object, or that takes an object, which returns
as a string the output that pp(object) would have produced. i know i can do
PP.pp(obj, port) but am looking for something shorter…