From 4fc3366d9d99a0eb19e45ad2bf38534efbf8c8ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?=
 <rafaelmfranca@gmail.com>
Date: Thu, 29 Dec 2016 15:39:50 -0500
Subject: Remove deprecated support to passing arguments to `#select` when a
 block is provided.

---
 activerecord/lib/active_record/relation/query_methods.rb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'activerecord/lib')

diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 2dcb2f49cd..2d19395191 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -243,9 +243,7 @@ module ActiveRecord
     def select(*fields)
       if block_given?
         if fields.any?
-          ActiveSupport::Deprecation.warn(<<-WARNING.squish)
-            When select is called with a block, it ignores other arguments. This behavior is now deprecated and will result in an ArgumentError in Rails 5.1. You can safely remove the arguments to resolve the deprecation warning because they do not have any effect on the output of the call to the select method with a block.
-          WARNING
+          raise ArgumentError, "`select' with block doesn't take arguments."
         end
 
         return super()
-- 
cgit v1.2.3