1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix ruby warnings

This fixes following warnings:

```
test/dependencies_test.rb:287: warning: possibly useless use of :: in void context
test/dependencies_test.rb:300: warning: possibly useless use of a constant in void context
```
This commit is contained in:
yuuji.yaginuma 2018-11-22 17:20:51 +09:00
parent 47ab6b36d7
commit f8bd01cdd9

View file

@ -284,7 +284,7 @@ class DependenciesTest < ActiveSupport::TestCase
def test_module_with_nested_class_requiring_lib_class
with_autoloading_fixtures do
ModuleFolder::NestedWithRequire
_ = ModuleFolder::NestedWithRequire # assignment to silence parse-time warning "possibly useless use of :: in void context"
assert defined?(ModuleFolder::LibClass)
assert_not ActiveSupport::Dependencies.autoloaded_constants.include?("ModuleFolder::LibClass")
@ -297,7 +297,7 @@ class DependenciesTest < ActiveSupport::TestCase
def test_module_with_nested_class_and_parent_requiring_lib_class
with_autoloading_fixtures do
NestedWithRequireParent
_ = NestedWithRequireParent # assignment to silence parse-time warning "possibly useless use of a constant in void context"
assert defined?(ModuleFolder::LibClass)
assert_not ActiveSupport::Dependencies.autoloaded_constants.include?("ModuleFolder::LibClass")