From a0d1eacafeac43aa72105c0afb451d2954ced374 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Mon, 11 Nov 2024 21:54:46 +0000 Subject: [PATCH 1/2] Relax ffi pin --- Gemfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index e15bbf4d5..3ac656127 100644 --- a/Gemfile +++ b/Gemfile @@ -59,8 +59,10 @@ elsif RUBY_VERSION < '2.0' gem 'ffi', '< 1.9.19' # ffi dropped Ruby 1.8 support in 1.9.19 elsif RUBY_VERSION < '2.3.0' gem 'ffi', '~> 1.12.0' -else +elsif RUBY_VERSION < '2.6.0' gem 'ffi', '~> 1.15.0' +else + gem 'ffi', '~> 1.17.0' end if RUBY_VERSION < '2.3.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/) From 9f53fec89afe6d1af95628d0c19b9ebe59bb1922 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Mon, 11 Nov 2024 21:56:21 +0000 Subject: [PATCH 2/2] Turn off rubocop rule for private reader --- lib/rspec/core/formatters/exception_presenter.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/rspec/core/formatters/exception_presenter.rb b/lib/rspec/core/formatters/exception_presenter.rb index 070c6d9a5..b723ed575 100644 --- a/lib/rspec/core/formatters/exception_presenter.rb +++ b/lib/rspec/core/formatters/exception_presenter.rb @@ -11,7 +11,12 @@ module Formatters class ExceptionPresenter attr_reader :exception, :example, :description, :message_color, :detail_formatter, :extra_detail_formatter, :backtrace_formatter + + # We want private attr_reader but that issues a warning on older rubies, refactor later + # + # rubocop:disable Style/AccessModifierDeclarations private :message_color, :detail_formatter, :extra_detail_formatter, :backtrace_formatter + # rubocop:enable Style/AccessModifierDeclarations def initialize(exception, example, options={}) @exception = exception