summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-02 09:30:11 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-02 09:30:11 +0000
commit1ef981bb3b47c396b5b0c99698dcf7063c83d4ff (patch)
treefc2fb49afc9977a33de55084da65a5ade73f71e1
parenta6b1cf368b1d6ab8b66a69eb63560a898b224d7e (diff)
ircbot.rb: correct Exception#pretty_print() definition
-rw-r--r--lib/rbot/ircbot.rb5
1 files changed, 4 insertions, 1 deletions
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