aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2015-07-23 10:12:19 +0930
committerMatthew Draper <matthew@trebex.net>2015-07-23 10:12:19 +0930
commitd517239d0c9cdb84a7ff3f90cebb1213d0e0b939 (patch)
tree5a167905ca162cdb2f1711f9a7e3f0efecd178fe /activesupport
parent52cf1a71b393486435fab4386a8663b146608996 (diff)
parent10c7f544d916f73245bdb37fde09c8cdcb2184e0 (diff)
downloadrails-d517239d0c9cdb84a7ff3f90cebb1213d0e0b939.tar.gz
rails-d517239d0c9cdb84a7ff3f90cebb1213d0e0b939.tar.bz2
rails-d517239d0c9cdb84a7ff3f90cebb1213d0e0b939.zip
Merge pull request #20989 from matthewd/no-lock-basic-require
Don't apply locking around basic #load / #require
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/dependencies.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index fc6f822969..be03f65e6e 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -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!