diff options
-rw-r--r-- | lib/redmine/hook.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/redmine/hook.rb b/lib/redmine/hook.rb index 46b9d4ea5..4b87f97c1 100644 --- a/lib/redmine/hook.rb +++ b/lib/redmine/hook.rb @@ -27,7 +27,10 @@ module Redmine # Adds a listener class. # Automatically called when a class inherits from Redmine::Hook::Listener. def add_listener(klass) - raise "Hooks must include Singleton module." unless klass.included_modules.include?(Singleton) + unless klass.included_modules.include?(Singleton) + raise "Hooks must include Singleton module." + end + @@listener_classes << klass clear_listeners_instances end |