From 8bda53a8cdb882ac0997aa159536d14e14d6c671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Thu, 23 Apr 2015 20:02:16 +0200 Subject: [PATCH] FIX: compatibility issue with akismet plugin --- lib/plugin/instance.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/plugin/instance.rb b/lib/plugin/instance.rb index f4c549dbae4..bc000987abf 100644 --- a/lib/plugin/instance.rb +++ b/lib/plugin/instance.rb @@ -69,9 +69,7 @@ class Plugin::Instance klass = klass.to_s.classify.constantize hidden_method_name = :"#{attr}_without_enable_check" - klass.send(:define_method, hidden_method_name) do |*args| - block.call(*args) - end + klass.send(:define_method, hidden_method_name, &block) plugin = self klass.send(:define_method, attr) do |*args|