Skip to content

Commit 2aa67ec

Browse files
authored
Merge pull request rails#53791 from fatkodima/fix-rubocop-offences
Fix rubocop offences
2 parents 65afe78 + d6034fb commit 2aa67ec

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

actionpack/test/dispatch/ssl_test.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ def assert_redirected(redirect: {}, from: "http://a/b?c=d", to: from.sub("http",
3434
assert_equal redirect[:body].join, @response.body
3535
end
3636

37-
def assert_post_redirected(redirect: {}, from: "http://a/b?c=d",
38-
to: from.sub("http", "https"))
39-
37+
def assert_post_redirected(redirect: {}, from: "http://a/b?c=d", to: from.sub("http", "https"))
4038
self.app = build_app ssl_options: { redirect: redirect }
4139

4240
post from

activemodel/lib/active_model/validations.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def validate(*args, &block)
176176
options = options.dup
177177
options[:except_on] = Array(options[:except_on])
178178
options[:unless] = [
179-
->(o) { (options[:except_on] & Array(o.validation_context)).any? },
179+
->(o) { options[:except_on].intersect?(Array(o.validation_context)) },
180180
*options[:unless]
181181
]
182182
end

activesupport/lib/active_support/core_ext/class/attribute.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ class Class
8484
#
8585
# class_attribute :settings, default: {}
8686
def class_attribute(*attrs, instance_accessor: true,
87-
instance_reader: instance_accessor, instance_writer: instance_accessor, instance_predicate: true, default: nil)
88-
87+
instance_reader: instance_accessor, instance_writer: instance_accessor, instance_predicate: true, default: nil
88+
)
8989
class_methods, methods = [], []
9090
attrs.each do |name|
9191
unless name.is_a?(Symbol) || name.is_a?(String)

0 commit comments

Comments
 (0)