]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/load-gettext.rb
gettext: support anonymous modules (and thus plugins) with newer gettext
[user/henk/code/ruby/rbot.git] / lib / rbot / load-gettext.rb
index 5738f19726fd069293cb8a970d4477f4f1b0f607..4d39b7e48fc6070f6c7e1394b1d2a5643a5ac8ed 100644 (file)
@@ -34,7 +34,8 @@ begin
       alias :orig_bound_targets :bound_targets
     end
     def bound_targets(*a)  # :nodoc:
-      orig_bound_targets(*a) rescue orig_bound_targets(Object)
+      bt = orig_bound_targets(*a) rescue []
+      bt.empty? ? orig_bound_targets(Object) : bt
     end
 
     require 'stringio'