]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commit
gettext: support anonymous modules (and thus plugins) with newer gettext
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 16 Apr 2008 21:49:41 +0000 (23:49 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 16 Apr 2008 21:49:41 +0000 (23:49 +0200)
commitb371854ac64eab8601b4a013e7ab5dd0c5db9ef5
tree288c0993c8c240cb5a193e629095d47062662767
parent5558808a3f0b63a7c8fadcadcee6f09aecea2e62
gettext: support anonymous modules (and thus plugins) with newer gettext

While older ruby-gettext raised when trying to bind for anonymous
modules (such as the ones that wrap rbot plugins), newer versions just
provide an empty array. This makes the previous fix (which used rescue)
ineffective.

Solve by rescuing with [] (so that older gettext behaves like the new
one) and then adding Object if the list is indeed empty.
lib/rbot/load-gettext.rb