In article <40B2A991.8000504 / hypermetrics.com>,
  Hal Fulton <hal9000 / hypermetrics.com> writes:

> My goal was to have a normal inspect that did not depend
> on pp.rb, but allow prettyprinting if pp.rb *was* used.

Define both inspect and pretty_print.

> I suppose I can do
>
>    if defined? pp
>      alias inspect pretty_print_inspect
>    else
>      def inspect
>        # ...
>      end
>    end
>
> Is this acceptable, or is there a better way?

You don't need `if'.  Just define inspect as you like.
pp.rb doesn't use inspect if pretty_print is defined.
-- 
Tanaka Akira