From 2e6658ae510e17e9e6e98ebd784066752ea6027c Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Fri, 26 May 2017 13:12:21 +0930 Subject: Clarify intentions around method redefinitions Don't use remove_method or remove_possible_method just before a new definition: at best the purpose is unclear, and at worst it creates a race condition. Instead, prefer redefine_method when practical, and silence_redefinition_of_method otherwise. --- actioncable/lib/action_cable/remote_connections.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actioncable/lib/action_cable') diff --git a/actioncable/lib/action_cable/remote_connections.rb b/actioncable/lib/action_cable/remote_connections.rb index a07a517092..283400d9e7 100644 --- a/actioncable/lib/action_cable/remote_connections.rb +++ b/actioncable/lib/action_cable/remote_connections.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "active_support/core_ext/module/redefine_method" + module ActionCable # If you need to disconnect a given connection, you can go through the # RemoteConnections. You can find the connections you're looking for by -- cgit v1.2.3