Skip to content

update to Ruby 2.6 #503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.5
2.6.3
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ DEPENDENCIES
whenever

RUBY VERSION
ruby 2.5.5p157
ruby 2.6.3p62

BUNDLED WITH
1.17.3
17 changes: 17 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,20 @@ def set_browser_locale(locale)
with.library :rails
end
end

# Rails 4.2 call `initialize` inside `recycle!`. However Ruby 2.6 doesn't allow calling `initialize` twice.
# More info: https://github.com/rails/rails/issues/34790
if Rails.version < "5"
module ActionController
class TestResponse < ActionDispatch::TestResponse
def recycle!
# hack to avoid MonitorMixin double-initialize error
@mon_mutex_owner_object_id = nil
@mon_mutex = nil
initialize
end
end
end
else
puts "⚠ Monkeypatch for ActionController::TestResponse no longer needed! Remove me please!"
end