aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2017-07-23 16:25:55 -0400
committerGitHub <noreply@github.com>2017-07-23 16:25:55 -0400
commit68191d0f6e8d763730a1ae3841570e11b2896272 (patch)
tree5aba32bb99a17cc623790b10097ad931769692a9 /actioncable/lib/action_cable
parent127b475dc251a06942fe0cd2de2e0545cf5ed69f (diff)
parent87bf94d1ceaf79debce72bba1e4ec219dc7b3215 (diff)
downloadrails-68191d0f6e8d763730a1ae3841570e11b2896272.tar.gz
rails-68191d0f6e8d763730a1ae3841570e11b2896272.tar.bz2
rails-68191d0f6e8d763730a1ae3841570e11b2896272.zip
Merge pull request #29901 from kirs/actioncable-frozen-friendly
Make actioncable ready for frozen strings
Diffstat (limited to 'actioncable/lib/action_cable')
-rw-r--r--actioncable/lib/action_cable/channel/base.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actioncable/lib/action_cable/channel/base.rb b/actioncable/lib/action_cable/channel/base.rb
index 718f630f58..33b34b4da0 100644
--- a/actioncable/lib/action_cable/channel/base.rb
+++ b/actioncable/lib/action_cable/channel/base.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "set"
module ActionCable
@@ -205,7 +207,9 @@ module ActionCable
# Transmit a hash of data to the subscriber. The hash will automatically be wrapped in a JSON envelope with
# the proper channel identifier marked as the recipient.
def transmit(data, via: nil) # :doc:
- logger.debug "#{self.class.name} transmitting #{data.inspect.truncate(300)}".tap { |m| m << " (via #{via})" if via }
+ status = "#{self.class.name} transmitting #{data.inspect.truncate(300)}"
+ status += " (via #{via})" if via
+ logger.debug(status)
payload = { channel_class: self.class.name, data: data, via: via }
ActiveSupport::Notifications.instrument("transmit.action_cable", payload) do