diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2016-11-27 23:31:13 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-27 23:31:13 -0300 |
commit | 45edcde78fd5e0c39173001a6ab9d1c7689c6383 (patch) | |
tree | c65e1791874e2d1e1eb2be9c3500b006964f099c | |
parent | 8b2505347ff020231e82dbdf55b5fadccf109770 (diff) | |
parent | 32225387c1e714f742b07fdf7121a2a0bc523c62 (diff) | |
download | rails-45edcde78fd5e0c39173001a6ab9d1c7689c6383.tar.gz rails-45edcde78fd5e0c39173001a6ab9d1c7689c6383.tar.bz2 rails-45edcde78fd5e0c39173001a6ab9d1c7689c6383.zip |
Merge pull request #27195 from y-yagi/use_public_module_include
use public Module#include instead of send :include
-rw-r--r-- | actionpack/test/controller/integration_test.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/test_fixtures_test.rb | 2 | ||||
-rw-r--r-- | activesupport/test/concern_test.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index d8be5d32e1..d3aa81a0f7 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -145,7 +145,7 @@ class IntegrationTestTest < ActiveSupport::TestCase name.to_s == "foo" ? "pass" : super end end - @test.class.superclass.__send__(:include, mixin) + @test.class.superclass.include(mixin) begin assert_equal "pass", @test.foo ensure diff --git a/activerecord/test/cases/test_fixtures_test.rb b/activerecord/test/cases/test_fixtures_test.rb index 14a5faa85e..7090202a89 100644 --- a/activerecord/test/cases/test_fixtures_test.rb +++ b/activerecord/test/cases/test_fixtures_test.rb @@ -3,7 +3,7 @@ require "cases/helper" class TestFixturesTest < ActiveRecord::TestCase setup do @klass = Class.new - @klass.send(:include, ActiveRecord::TestFixtures) + @klass.include(ActiveRecord::TestFixtures) end def test_deprecated_use_transactional_fixtures= diff --git a/activesupport/test/concern_test.rb b/activesupport/test/concern_test.rb index 95507c815d..7a5a5414a7 100644 --- a/activesupport/test/concern_test.rb +++ b/activesupport/test/concern_test.rb @@ -76,7 +76,7 @@ class ConcernTest < ActiveSupport::TestCase end def test_class_methods_are_extended_only_on_expected_objects - ::Object.__send__(:include, Qux) + ::Object.include(Qux) Object.extend(Qux::ClassMethods) # module needs to be created after Qux is included in Object or bug won't # be triggered |