diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-21 07:29:44 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-21 07:29:44 +0000 |
commit | 9a77e2f2bed486189c6246bf346369b19e1ea21a (patch) | |
tree | 5b4da1c9a215b3e763df8c5bb13b21639dd0975a /activesupport/lib/active_support/dependencies.rb | |
parent | d7924273014a183e86538f33f0f52ceade10cd46 (diff) | |
download | rails-9a77e2f2bed486189c6246bf346369b19e1ea21a.tar.gz rails-9a77e2f2bed486189c6246bf346369b19e1ea21a.tar.bz2 rails-9a77e2f2bed486189c6246bf346369b19e1ea21a.zip |
r3240@asus: jeremy | 2005-11-20 23:22:34 -0800
Introduce enable_warnings counterpart to silence_warnings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3134 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/dependencies.rb')
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 30911453bc..b0aca1ee97 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -1,5 +1,6 @@ require File.dirname(__FILE__) + '/module_attribute_accessors' require File.dirname(__FILE__) + '/core_ext/load_error' +require File.dirname(__FILE__) + '/core_ext/kernel' module Dependencies #:nodoc: extend self @@ -37,12 +38,7 @@ module Dependencies #:nodoc: def require_or_load(file_name) file_name = "#{file_name}.rb" unless ! load? || file_name[-3..-1] == '.rb' if load? - begin - original_verbosity, $VERBOSE = $VERBOSE, true - load file_name - ensure - $VERBOSE = original_verbosity - end + enable_warnings { load file_name } else require file_name end |