aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/channel
diff options
context:
space:
mode:
authorKir Shatrov <shatrov@me.com>2017-07-23 23:19:46 +0300
committerKir Shatrov <shatrov@me.com>2017-07-23 23:20:40 +0300
commit87bf94d1ceaf79debce72bba1e4ec219dc7b3215 (patch)
tree906c5b91cd424b99e58b8edc462fef91bda7fc1d /actioncable/lib/action_cable/channel
parenta532eb448f8ead1640ef3d886eb8e02fc46583e6 (diff)
downloadrails-87bf94d1ceaf79debce72bba1e4ec219dc7b3215.tar.gz
rails-87bf94d1ceaf79debce72bba1e4ec219dc7b3215.tar.bz2
rails-87bf94d1ceaf79debce72bba1e4ec219dc7b3215.zip
Make actioncable ready for frozen strings
Diffstat (limited to 'actioncable/lib/action_cable/channel')
-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