From: Alexander Beisig Date: Sat, 5 Aug 2006 18:08:09 +0000 (+0000) Subject: make sure @commands is never nil in script.rb X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;ds=inline;h=59dce593cbb73af44d26b143837154e786a2012a;hp=eb66066cc02007be51b8f9d376085bc70ee92a0a;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git make sure @commands is never nil in script.rb --- diff --git a/data/rbot/plugins/script.rb b/data/rbot/plugins/script.rb index 171dabcb..f744ed01 100644 --- a/data/rbot/plugins/script.rb +++ b/data/rbot/plugins/script.rb @@ -18,7 +18,9 @@ class ScriptPlugin < Plugin super if @registry.has_key?(:commands) @commands = @registry[:commands] - else + end + + if @commands.nil? @commands = Hash.new end