From 9ba5a817cdb7aa1e96783e8c1560a67ea800f51c Mon Sep 17 00:00:00 2001 From: Max Melentiev Date: Thu, 2 Jun 2016 21:19:27 +0300 Subject: [PATCH] Fixed doubled instrumentation for reply_with --- lib/telegram/bot/updates_controller/instrumentation.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/telegram/bot/updates_controller/instrumentation.rb b/lib/telegram/bot/updates_controller/instrumentation.rb index 9337a52..99988bf 100644 --- a/lib/telegram/bot/updates_controller/instrumentation.rb +++ b/lib/telegram/bot/updates_controller/instrumentation.rb @@ -35,10 +35,8 @@ module Telegram end end - %i(respond_with reply_with).each do |method| - define_method(method) do |type, *args| - Instrumentation.instrument(:respond_with, type: type) { super(type, *args) } - end + def respond_with(type, *) + Instrumentation.instrument(:respond_with, type: type) { super } end %i(answer_callback_query answer_inline_query).each do |type|