1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Removal Of warninig message by not allowing to create singleton method if already created

This commit is contained in:
Vaibhav 2017-12-18 17:01:28 +05:30 committed by Mike Perham
parent b4c330bbfa
commit 84f17d97ed

View file

@ -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)