From fd4fdf6c4ac9a3b55cc7a8ab1cf535d64416ddf8 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 31 Jul 2007 14:18:21 +0000 Subject: botuser.rb: don't fail when being passed nil instead of an array to load --- lib/rbot/botuser.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/rbot/botuser.rb b/lib/rbot/botuser.rb index 8d01632e..d859e9c3 100644 --- a/lib/rbot/botuser.rb +++ b/lib/rbot/botuser.rb @@ -547,6 +547,10 @@ module Irc end def load_array(ary, forced) + unless ary + warn "Tried to load an empty array" + return + end raise "Won't load with unsaved changes" if @has_changes and not forced reset_hashes ary.each { |x| -- cgit v1.2.3