From 941e99041048e701e247ac8c7bf068fc3816b040 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 13 Sep 2009 06:06:20 -0700 Subject: Shush, new_callbacks --- activesupport/lib/active_support/new_callbacks.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/new_callbacks.rb b/activesupport/lib/active_support/new_callbacks.rb index ce08ea8660..a9d5f6ac5b 100644 --- a/activesupport/lib/active_support/new_callbacks.rb +++ b/activesupport/lib/active_support/new_callbacks.rb @@ -396,8 +396,10 @@ module ActiveSupport end RUBY_EVAL - undef_method "_run_#{symbol}_callbacks" if method_defined?("_run_#{symbol}_callbacks") - class_eval body, __FILE__, line + silence_warnings do + undef_method "_run_#{symbol}_callbacks" if method_defined?("_run_#{symbol}_callbacks") + class_eval body, __FILE__, line + end end # This is called the first time a callback is called with a particular -- cgit v1.2.3