diff options
-rw-r--r-- | lib/rbot/ircbot.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index a08dae9f..3ef58a38 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -15,6 +15,13 @@ $logger.level = 0 if $debug require 'pp' +unless Kernel.instance_methods.include?("pretty_inspect") + def pretty_inspect + PP.pp(self, '') + end + public :pretty_inspect +end + class Exception def pretty_print(q) q.group(1, "#<%s: %s" % [self.class, self.message], ">") { |