From: Giuseppe Bilotta Date: Mon, 21 Jan 2013 18:41:38 +0000 (+0100) Subject: rss: protect against nil field X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=09f54bf35cdcdc278373521f6b4a3928ed81f744;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git rss: protect against nil field This happens when the filter tries to wrap a non-existing field, and in custom filters it's probably a sign that the wrong field are being accessed. It would probably be nicer to raise a warning about this, but I'm too lazy to add that now. --- diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index b2d367b0..f7e559f7 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -392,7 +392,7 @@ class RSSFeedsPlugin < Plugin # do nothing else warning "ignoring #{v.inspect} wrapping of unknown class" - end + end unless ss[nk].nil? else subs[k] = v end