diff options
author | kennyj <kennyj@gmail.com> | 2012-12-06 00:38:09 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-12-06 01:10:03 +0900 |
commit | 180e2e5e9e9aac7123f94eda61144241566b445d (patch) | |
tree | 44723b2715eec7189d4f2df552278e877237501b /activesupport | |
parent | 6ed4ad133486f235fcba136d3a660d89f769beb9 (diff) | |
download | rails-180e2e5e9e9aac7123f94eda61144241566b445d.tar.gz rails-180e2e5e9e9aac7123f94eda61144241566b445d.tar.bz2 rails-180e2e5e9e9aac7123f94eda61144241566b445d.zip |
silence warning: possibly useless use of a constant in void context
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/dependencies_test.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index 952c82f9d8..51a7e4b2fe 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -923,8 +923,10 @@ class DependenciesTest < ActiveSupport::TestCase def test_remove_constant_does_not_autoload_already_removed_parents_as_a_side_effect with_autoloading_fixtures do - ::A - ::A::B + silence_warnings do + ::A + ::A::B + end ActiveSupport::Dependencies.remove_constant('A') ActiveSupport::Dependencies.remove_constant('A::B') assert !defined?(A) @@ -934,7 +936,9 @@ class DependenciesTest < ActiveSupport::TestCase def test_load_once_constants_should_not_be_unloaded with_autoloading_fixtures do ActiveSupport::Dependencies.autoload_once_paths = ActiveSupport::Dependencies.autoload_paths - ::A.to_s + silence_warnings do + ::A + end assert defined?(A) ActiveSupport::Dependencies.clear assert defined?(A) |