aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/support/misc.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-11-30 16:25:08 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-11-30 16:25:08 +0000
commitac3c8a54f83418b5cac4b093fc1bae29f59f3a1f (patch)
tree74af81eee9a48c8f61f3aa3c3f462c05426f55d5 /activerecord/lib/active_record/support/misc.rb
parenta682d20873ce0b36e2f1885b4ccc19cd8f45d5ed (diff)
downloadrails-ac3c8a54f83418b5cac4b093fc1bae29f59f3a1f.tar.gz
rails-ac3c8a54f83418b5cac4b093fc1bae29f59f3a1f.tar.bz2
rails-ac3c8a54f83418b5cac4b093fc1bae29f59f3a1f.zip
Silence errors occurring when reloading classes
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@27 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/support/misc.rb')
-rw-r--r--activerecord/lib/active_record/support/misc.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/support/misc.rb b/activerecord/lib/active_record/support/misc.rb
new file mode 100644
index 0000000000..db842f6061
--- /dev/null
+++ b/activerecord/lib/active_record/support/misc.rb
@@ -0,0 +1,6 @@
+def silence_warnings
+ old_verbose, $VERBOSE = $VERBOSE, nil
+ result = yield
+ $VERBOSE = old_verbose
+ return result
+end