aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorrick <technoweenie@gmail.com>2008-05-31 13:39:58 -0700
committerrick <technoweenie@gmail.com>2008-05-31 13:39:58 -0700
commit2243ffd1ffe3a129af20a33e72574f7ee4534730 (patch)
tree2085fd3e529feebf5aac1d886e48eeee89a85638 /activesupport/lib
parentfbd901e8d6608cc5c68b4f53156b637e88e1400e (diff)
parent77e45352e7e947f1df1bfb8fe7d9e4e133224dd9 (diff)
downloadrails-2243ffd1ffe3a129af20a33e72574f7ee4534730.tar.gz
rails-2243ffd1ffe3a129af20a33e72574f7ee4534730.tar.bz2
rails-2243ffd1ffe3a129af20a33e72574f7ee4534730.zip
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/dependencies.rb19
1 files changed, 10 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 25225d5615..da2ece610a 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -82,9 +82,10 @@ module Dependencies #:nodoc:
# infinite loop with mutual dependencies.
loaded << expanded
- if load?
- log "loading #{file_name}"
- begin
+ begin
+ if load?
+ log "loading #{file_name}"
+
# Enable warnings iff this file has not been loaded before and
# warnings_on_first_load is set.
load_args = ["#{file_name}.rb"]
@@ -95,13 +96,13 @@ module Dependencies #:nodoc:
else
enable_warnings { result = load_file(*load_args) }
end
- rescue Exception
- loaded.delete expanded
- raise
+ else
+ log "requiring #{file_name}"
+ result = require file_name
end
- else
- log "requiring #{file_name}"
- result = require file_name
+ rescue Exception
+ loaded.delete expanded
+ raise
end
# Record history *after* loading so first load gets warnings.