Permalink
Browse files
Silence scope resolution warnings
- Loading branch information...
Showing
with
6 additions
and
4 deletions.
-
+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