lib/telegram/bot/middleware.rb in telegram-bot-0.16.1 vs lib/telegram/bot/middleware.rb in telegram-bot-0.16.3

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'active_support/concern' require 'active_support/core_ext/hash/indifferent_access' require 'active_support/json' require 'action_dispatch' @@ -19,10 +21,10 @@ controller.dispatch(bot, update, request) [200, {}, ['']] end def inspect - "#<#{self.class.name}(#{controller.try!(:name)})>" + "#<#{self.class.name}(#{controller&.name})>" end end end end