From 1ef981bb3b47c396b5b0c99698dcf7063c83d4ff Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 2 Sep 2007 09:30:11 +0000 Subject: ircbot.rb: correct Exception#pretty_print() definition --- lib/rbot/ircbot.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/rbot') diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index d6e874be..e1713840 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -30,7 +30,10 @@ end class Exception def pretty_print(q) q.group(1, "#<%s: %s" % [self.class, self.message], ">") { - q.seplist(self.backtrace, lambda { "\n" }) { |v| v } if self.backtrace + if self.backtrace and not self.backtrace.empty? + q.text "\n" + q.seplist(self.backtrace, lambda { q.text "\n" } ) { |l| q.text l } + end } end end -- cgit v1.2.3