mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #20989 from matthewd/no-lock-basic-require
Don't apply locking around basic #load / #require
This commit is contained in:
commit
d517239d0c
1 changed files with 4 additions and 6 deletions
|
@ -255,12 +255,10 @@ module ActiveSupport #:nodoc:
|
|||
end
|
||||
|
||||
def load_dependency(file)
|
||||
Dependencies.load_interlock do
|
||||
if Dependencies.load? && ActiveSupport::Dependencies.constant_watch_stack.watching?
|
||||
Dependencies.new_constants_in(Object) { yield }
|
||||
else
|
||||
yield
|
||||
end
|
||||
if Dependencies.load? && ActiveSupport::Dependencies.constant_watch_stack.watching?
|
||||
Dependencies.new_constants_in(Object) { yield }
|
||||
else
|
||||
yield
|
||||
end
|
||||
rescue Exception => exception # errors from loading file
|
||||
exception.blame_file! file if exception.respond_to? :blame_file!
|
||||
|
|
Loading…
Reference in a new issue