From 84f17d97ed5bd376d26e01274db6f863f2a13d6b Mon Sep 17 00:00:00 2001 From: Vaibhav Date: Mon, 18 Dec 2017 17:01:28 +0530 Subject: [PATCH] Removal Of warninig message by not allowing to create singleton method if already created --- lib/sidekiq/web/action.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sidekiq/web/action.rb b/lib/sidekiq/web/action.rb index fdf32eec..5dd70478 100644 --- a/lib/sidekiq/web/action.rb +++ b/lib/sidekiq/web/action.rb @@ -77,7 +77,7 @@ module Sidekiq private def _erb(file, locals) - locals.each {|k, v| define_singleton_method(k){ v } } if locals + locals.each {|k, v| define_singleton_method(k){ v } unless (singleton_methods.include? k)} if locals if file.kind_of?(String) ERB.new(file).result(binding)