aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAndrew White <andrew.white@unboxedconsulting.com>2016-04-03 23:35:15 +0100
committerAndrew White <andrew.white@unboxedconsulting.com>2016-04-03 23:47:05 +0100
commit811fd0a6b47c83cd4f668127bb822dc5cdcfc0f5 (patch)
treec76c339e8709aa4e0dd5920ef2c933cd5b68e25e /activesupport
parent7199301a7bc1eec34a20c1549e19ec1c32c419e7 (diff)
downloadrails-811fd0a6b47c83cd4f668127bb822dc5cdcfc0f5.tar.gz
rails-811fd0a6b47c83cd4f668127bb822dc5cdcfc0f5.tar.bz2
rails-811fd0a6b47c83cd4f668127bb822dc5cdcfc0f5.zip
Prevent void context warnings
The constant reference A::B used to trigger autoloading causes a warning to be logged about the possible use of :: in a void context so assign it to the _ variable to prevent the warnings from being triggered.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/autoloading_fixtures/raises_arbitrary_exception.rb2
-rw-r--r--activesupport/test/autoloading_fixtures/throws.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/autoloading_fixtures/raises_arbitrary_exception.rb b/activesupport/test/autoloading_fixtures/raises_arbitrary_exception.rb
index 404ae289c6..3ca4213c71 100644
--- a/activesupport/test/autoloading_fixtures/raises_arbitrary_exception.rb
+++ b/activesupport/test/autoloading_fixtures/raises_arbitrary_exception.rb
@@ -1,4 +1,4 @@
RaisesArbitraryException = 1
-A::B # Autoloading recursion, also expected to be watched and discarded.
+_ = A::B # Autoloading recursion, also expected to be watched and discarded.
raise Exception, 'arbitray exception message'
diff --git a/activesupport/test/autoloading_fixtures/throws.rb b/activesupport/test/autoloading_fixtures/throws.rb
index 5e47b9699b..e1d96cc512 100644
--- a/activesupport/test/autoloading_fixtures/throws.rb
+++ b/activesupport/test/autoloading_fixtures/throws.rb
@@ -1,4 +1,4 @@
Throws = 1
-A::B # Autoloading recursion, expected to be discarded.
+_ = A::B # Autoloading recursion, expected to be discarded.
throw :t