diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-09-02 09:30:11 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-09-02 09:30:11 +0000 |
commit | 1ef981bb3b47c396b5b0c99698dcf7063c83d4ff (patch) | |
tree | fc2fb49afc9977a33de55084da65a5ade73f71e1 /lib/rbot | |
parent | a6b1cf368b1d6ab8b66a69eb63560a898b224d7e (diff) |
ircbot.rb: correct Exception#pretty_print() definition
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/ircbot.rb | 5 |
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 |