summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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