aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2015-01-17 12:15:20 +0530
committerPratik Naik <pratiknaik@gmail.com>2015-01-17 12:15:20 +0530
commit76c230e7d80d72352da76f5c95b786b183cdfa09 (patch)
tree1c05ad54fc80ae5578c7e90e9b89010a60bf5b87 /lib
parent6a78da924960039d17b618f775695682bb9940d9 (diff)
downloadrails-76c230e7d80d72352da76f5c95b786b183cdfa09.tar.gz
rails-76c230e7d80d72352da76f5c95b786b183cdfa09.tar.bz2
rails-76c230e7d80d72352da76f5c95b786b183cdfa09.zip
Use instance_exec to invoke the lambda callback
Diffstat (limited to 'lib')
-rw-r--r--lib/action_cable/channel/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/action_cable/channel/base.rb b/lib/action_cable/channel/base.rb
index 3eaa0ceaeb..9f72467f17 100644
--- a/lib/action_cable/channel/base.rb
+++ b/lib/action_cable/channel/base.rb
@@ -60,7 +60,7 @@ module ActionCable
def start_periodic_timers
self.class.periodic_timers.each do |callback, options|
@_active_periodic_timers << EventMachine::PeriodicTimer.new(options[:every]) do
- callback.respond_to?(:call) ? callback.call : send(callback)
+ callback.respond_to?(:call) ? instance_exec(&callback) : send(callback)
end
end
end