1
0
Fork 0
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:
Matthew Draper 2015-07-23 10:12:19 +09:30
commit d517239d0c

View file

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