From f49ab715f71db434c3b98517bd6b7703a99a1435 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 19 Nov 2020 13:30:00 +0000 Subject: [PATCH] shorten long line of lib/redmine/hook.rb git-svn-id: http://svn.redmine.org/redmine/trunk@20429 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/hook.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.39.5