diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-11 10:22:09 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-11 10:22:09 -0800 |
commit | 5d2b5ba23e93f4fd4992c418c9bb2fc721df4206 (patch) | |
tree | fea6d6473015f03499388e0a60ee13680179695c /activesupport/lib | |
parent | 17ac2a248282ed34b694ebd4fc651d6a0eb1a23d (diff) | |
parent | cbb38bbdba0f7cfb628a0f8716e79d0d079fd7bf (diff) | |
download | rails-5d2b5ba23e93f4fd4992c418c9bb2fc721df4206.tar.gz rails-5d2b5ba23e93f4fd4992c418c9bb2fc721df4206.tar.bz2 rails-5d2b5ba23e93f4fd4992c418c9bb2fc721df4206.zip |
Merge branch 'master' into testing
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 3d871eec11..fe568d6127 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -138,14 +138,22 @@ module ActiveSupport #:nodoc: end def load_with_new_constant_marking(file, *extras) #:nodoc: - Dependencies.new_constants_in(Object) { load_without_new_constant_marking(file, *extras) } + if Dependencies.load? + Dependencies.new_constants_in(Object) { load_without_new_constant_marking(file, *extras) } + else + load_without_new_constant_marking(file, *extras) + end rescue Exception => exception # errors from loading file exception.blame_file! file raise end def require(file, *extras) #:nodoc: - Dependencies.new_constants_in(Object) { super } + if Dependencies.load? + Dependencies.new_constants_in(Object) { super } + else + super + end rescue Exception => exception # errors from required file exception.blame_file! file raise |