diff options
author | Jeremy Daer <jeremydaer@gmail.com> | 2015-10-16 00:32:46 -0700 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2015-10-16 00:32:46 -0700 |
commit | 4d6f1b0cbe814e3b62a991450ade6e9c79c966bf (patch) | |
tree | 801a3c5643020c917b0202978938e8f8ff939d3a /lib/action_cable | |
parent | e456d734f70de3dfb245c2d2e3ce9c7e22ebdb71 (diff) | |
download | rails-4d6f1b0cbe814e3b62a991450ade6e9c79c966bf.tar.gz rails-4d6f1b0cbe814e3b62a991450ade6e9c79c966bf.tar.bz2 rails-4d6f1b0cbe814e3b62a991450ade6e9c79c966bf.zip |
Shush some low-hanging Ruby warnings
Diffstat (limited to 'lib/action_cable')
-rw-r--r-- | lib/action_cable/connection/identification.rb | 2 | ||||
-rw-r--r-- | lib/action_cable/server/connections.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/action_cable/connection/identification.rb b/lib/action_cable/connection/identification.rb index 4e9beac058..95863795dd 100644 --- a/lib/action_cable/connection/identification.rb +++ b/lib/action_cable/connection/identification.rb @@ -22,7 +22,7 @@ module ActionCable # Return a single connection identifier that combines the value of all the registered identifiers into a single gid. def connection_identifier - if @connection_identifier.blank? + unless defined? @connection_identifier @connection_identifier = connection_gid identifiers.map { |id| instance_variable_get("@#{id}") }.compact end diff --git a/lib/action_cable/server/connections.rb b/lib/action_cable/server/connections.rb index 153cebd710..47dcea8c20 100644 --- a/lib/action_cable/server/connections.rb +++ b/lib/action_cable/server/connections.rb @@ -24,7 +24,7 @@ module ActionCable def setup_heartbeat_timer EM.next_tick do @heartbeat_timer ||= EventMachine.add_periodic_timer(BEAT_INTERVAL) do - EM.next_tick { connections.map &:beat } + EM.next_tick { connections.map(&:beat) } end end end |