Skip to content

Commit 5d122f2

Browse files
committed
Fix rubocop offenses
1 parent 3715a10 commit 5d122f2

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ group :bench do
5353
end
5454

5555
group :test do
56-
platforms *(@windows_platforms + [:ruby]) do
56+
platforms(*(@windows_platforms + [:ruby])) do
5757
if version == 'master' || version >= '6'
5858
gem 'sqlite3', '~> 1.4'
5959
else
@@ -71,7 +71,7 @@ group :test do
7171
gem 'm', '~> 1.5'
7272
gem 'pry', '>= 0.10'
7373
gem 'byebug', '~> 8.2' if RUBY_VERSION < '2.2'
74-
gem 'pry-byebug', platform: :ruby
74+
gem 'pry-byebug', platforms: :ruby
7575
end
7676

7777
group :development, :test do

test/benchmark/config.ru

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require File.expand_path(['..', 'app'].join(File::SEPARATOR), __FILE__)
24

35
run Rails.application

test/support/ruby_2_6_rails_4_2_patch.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
if RUBY_VERSION >= '2.6.0'
44
if Rails::VERSION::MAJOR < 5
5-
class ActionController::TestResponse < ActionDispatch::TestResponse
6-
def recycle!
7-
# hack to avoid MonitorMixin double-initialize error:
8-
@mon_mutex_owner_object_id = nil
9-
@mon_mutex = nil
10-
initialize
5+
module ActionController
6+
class TestResponse < ActionDispatch::TestResponse
7+
def recycle!
8+
# HACK: to avoid MonitorMixin double-initialize error:
9+
@mon_mutex_owner_object_id = nil
10+
@mon_mutex = nil
11+
initialize
12+
end
1113
end
1214
end
1315
else
14-
puts "Monkeypatch for ActionController::TestResponse no longer needed"
16+
puts 'Monkeypatch for ActionController::TestResponse no longer needed'
1517
end
1618
end

0 commit comments

Comments
 (0)