diff --git a/activerecord/lib/active_record/named_scope.rb b/activerecord/lib/active_record/named_scope.rb index d606934dce..ff6c041ef4 100644 --- a/activerecord/lib/active_record/named_scope.rb +++ b/activerecord/lib/active_record/named_scope.rb @@ -165,7 +165,7 @@ module ActiveRecord end def ==(other) - other.respond_to?(:to_a) ? to_a == other.to_a : false + other.respond_to?(:to_ary) ? to_a == other.to_a : false end private