From 4d6f1b0cbe814e3b62a991450ade6e9c79c966bf Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Fri, 16 Oct 2015 00:32:46 -0700 Subject: Shush some low-hanging Ruby warnings --- lib/action_cable/connection/identification.rb | 2 +- lib/action_cable/server/connections.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/action_cable') 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 -- cgit v1.2.3