aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2017-09-15 13:56:25 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2017-10-23 12:50:47 -0400
commit9c6ee1bed0292fc32c23dc1c68951ae64fc510be (patch)
treee65b37e20607eaef47106b31d4899ebc6fe95b31
parentd6b779ecebe57f6629352c34bfd6c442ac8fba0e (diff)
downloadrails-9c6ee1bed0292fc32c23dc1c68951ae64fc510be.tar.gz
rails-9c6ee1bed0292fc32c23dc1c68951ae64fc510be.tar.bz2
rails-9c6ee1bed0292fc32c23dc1c68951ae64fc510be.zip
Remove deprecated arguments from `#verify!`
-rw-r--r--activerecord/CHANGELOG.md4
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_adapter.rb5
-rw-r--r--activerecord/test/cases/adapters/mysql2/connection_test.rb12
3 files changed, 5 insertions, 16 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index daa02ad96a..abafe524f6 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,7 @@
+* Remove deprecated arguments from `#verify!`.
+
+ *Rafael Mendonça França*
+
* Remove deprecated argument `name` from `#indexes`.
*Rafael Mendonça França*
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
index a848dacff3..e3aab8dad8 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -392,10 +392,7 @@ module ActiveRecord
# Checks whether the connection to the database is still active (i.e. not stale).
# This is done under the hood by calling #active?. If the connection
# is no longer active, then this method will reconnect to the database.
- def verify!(*ignored)
- if ignored.size > 0
- ActiveSupport::Deprecation.warn("Passing arguments to #verify method of the connection has no effect and has been deprecated. Please remove all arguments from the #verify method call.")
- end
+ def verify!
reconnect! unless active?
end
diff --git a/activerecord/test/cases/adapters/mysql2/connection_test.rb b/activerecord/test/cases/adapters/mysql2/connection_test.rb
index 9d81d506a0..e61c70848a 100644
--- a/activerecord/test/cases/adapters/mysql2/connection_test.rb
+++ b/activerecord/test/cases/adapters/mysql2/connection_test.rb
@@ -65,18 +65,6 @@ class Mysql2ConnectionTest < ActiveRecord::Mysql2TestCase
assert @connection.active?
end
- def test_verify_with_args_is_deprecated
- assert_deprecated do
- @connection.verify!(option: true)
- end
- assert_deprecated do
- @connection.verify!([])
- end
- assert_deprecated do
- @connection.verify!({})
- end
- end
-
def test_execute_after_disconnect
@connection.disconnect!