Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #8424 from kennyj/tiny_fixes_20121206

fix warning: possibly useless use of a constant in void context
  • Loading branch information...
commit 396c0681acab95a58f0583d722f488b5b01398d8 2 parents 6ed4ad1 + 180e2e5
@fxn fxn authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 activesupport/test/dependencies_test.rb
View
10 activesupport/test/dependencies_test.rb
@@ -923,8 +923,10 @@ def test_remove_constant_does_not_trigger_loading_autoloads
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 @@ def test_remove_constant_does_not_autoload_already_removed_parents_as_a_side_eff
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)
Please sign in to comment.
Something went wrong with that request. Please try again.