mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
load constants from within nested namespace rather than prioriting root
namespace
This commit is contained in:
parent
84f17d97ed
commit
071a235e88
1 changed files with 3 additions and 1 deletions
|
@ -217,7 +217,9 @@ module Sidekiq
|
|||
names.shift if names.empty? || names.first.empty?
|
||||
|
||||
names.inject(Object) do |constant, name|
|
||||
constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name)
|
||||
# the false flag limits search for name to under the constant namespace
|
||||
# which mimics Rails' behaviour
|
||||
constant.const_defined?(name, false) ? constant.const_get(name, false) : constant.const_missing(name)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue