Permalink
Browse files

Shush, new_callbacks

  • Loading branch information...
1 parent c2018b4 commit 941e99041048e701e247ac8c7bf068fc3816b040 @jeremy jeremy committed Sep 13, 2009
Showing with 4 additions and 2 deletions.
  1. +4 −2 activesupport/lib/active_support/new_callbacks.rb
@@ -396,8 +396,10 @@ def _run_#{symbol}_callbacks(key = nil, &blk)
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

0 comments on commit 941e990

Please sign in to comment.