diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-07-31 14:18:21 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-07-31 14:18:21 +0000 |
commit | fd4fdf6c4ac9a3b55cc7a8ab1cf535d64416ddf8 (patch) | |
tree | 03368e03a2b0f1dd9a58c88b51768e42789995fe /lib/rbot | |
parent | e26f59c40ae758411d6814a0853b928ceffcbded (diff) |
botuser.rb: don't fail when being passed nil instead of an array to load
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/botuser.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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|
|