Permalink
Browse files

Silence scope resolution warnings

  • Loading branch information...
jeremy committed Jun 11, 2008
1 parent 65bc8f3 commit e6c1f46eb0fe637195bdf95647dd3aee72467580
Showing with 6 additions and 4 deletions.
  1. +6 −4 activerecord/lib/active_record/base.rb
@@ -1903,10 +1903,12 @@ def current_scoped_methods #:nodoc:
# MyApp::Business::Account would appear as MyApp::Business::AccountSubclass.
def compute_type(type_name)
modularized_name = type_name_with_module(type_name)
- begin
- class_eval(modularized_name, __FILE__, __LINE__)
- rescue NameError
- class_eval(type_name, __FILE__, __LINE__)
+ silence_warnings do
+ begin
+ class_eval(modularized_name, __FILE__, __LINE__)
+ rescue NameError
+ class_eval(type_name, __FILE__, __LINE__)
+ end
end
end

0 comments on commit e6c1f46

Please sign in to comment.