From 1cec7e6f34331b27a969e17e5f1c3ce36bd745e7 Mon Sep 17 00:00:00 2001 From: Benoit Tigeot Date: Sun, 19 May 2019 12:11:51 +0200 Subject: [PATCH] [mocks] Deal with new ffi Ruby version requirement (rspec/rspec-mocks#1276) https://github.com/ffi/ffi/pull/683 Related: - https://github.com/ffi/ffi/issues/699 --- This commit was imported from https://github.com/rspec/rspec-mocks/commit/2182ced3a005ff05a6dcad32a5904c8b5d9cf31e. --- rspec-mocks/Gemfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rspec-mocks/Gemfile b/rspec-mocks/Gemfile index 22fa0843e..da186a0a7 100644 --- a/rspec-mocks/Gemfile +++ b/rspec-mocks/Gemfile @@ -19,10 +19,19 @@ if RUBY_VERSION >= '2.4' && RUBY_ENGINE == 'ruby' gem 'rubocop', "~> 0.52.1" end -if RUBY_VERSION < '2.0.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/) - gem 'ffi', '< 1.9.15' # allow ffi to be installed on older rubies on windows +# allow gems to be installed on older rubies and/or windows +if RUBY_VERSION < '2.2.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/) + gem 'ffi', '< 1.10' elsif RUBY_VERSION < '1.9' gem 'ffi', '< 1.9.19' # ffi dropped Ruby 1.8 support in 1.9.19 +elsif RUBY_VERSION < '2.0' + gem 'ffi', '< 1.11.0' # ffi dropped Ruby 1.9 support in 1.11.0 +else + gem 'ffi', '> 1.9.24' # prevent Github security vulnerability warning +end + +if RUBY_VERSION < '2.2.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/) + gem "childprocess", "< 1.0.0" end ### deps for rdoc.info