From 5df4814c2e2d038e384d87b258bf508ee4c3a6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 3 Jan 2012 16:57:12 +0100 Subject: config: allow nil ext engine registration --- lib/zorglub/config.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/zorglub/config.rb b/lib/zorglub/config.rb index 2b86c0f..acf828e 100644 --- a/lib/zorglub/config.rb +++ b/lib/zorglub/config.rb @@ -39,13 +39,15 @@ module Zorglub end # def register_engine name, ext, proc - return unless name and ext + return unless name @engines[name]=[ ext, proc ] end # def engine_ext engine e = @engines[engine] - ( e.nil? ? '' : '.'+e[0] ) + return '' if e.nil? + x=e[0] + ( x.nil? ? '' : '.'+x ) end # def engine_proc engine -- cgit v1.1-2-g2b99