diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 16:57:12 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 16:57:12 +0100 |
commit | 5df4814c2e2d038e384d87b258bf508ee4c3a6cb (patch) | |
tree | 4ec18338599fc7c10fb93bf04522a99936be5e95 /lib | |
parent | fa90c7e5a1a104db2e8e5beec7dc504f7e42e551 (diff) | |
download | zorglub-5df4814c2e2d038e384d87b258bf508ee4c3a6cb.zip zorglub-5df4814c2e2d038e384d87b258bf508ee4c3a6cb.tar.gz |
config: allow nil ext engine registration
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zorglub/config.rb | 6 |
1 files 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 |