From ff37c90b2fca93b1c6ab5458cecd75bdbd744d4b Mon Sep 17 00:00:00 2001 From: Hans de Graaff Date: Fri, 9 Mar 2018 07:13:43 +0100 Subject: dev-ruby/rspec-mocks: add ruby25 Package-Manager: Portage-2.3.19, Repoman-2.3.6 --- .../files/rspec-mocks-3.7.0-ruby25-1.patch | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch (limited to 'dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch') diff --git a/dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch b/dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch new file mode 100644 index 000000000000..6b545ae3cf7a --- /dev/null +++ b/dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch @@ -0,0 +1,27 @@ +From 871eb31e3bfe50705ca57e754771aa1e0164f12d Mon Sep 17 00:00:00 2001 +From: Myron Marston +Date: Sat, 30 Dec 2017 17:45:43 -0800 +Subject: [PATCH] Skip spec that does not apply to Ruby 2.5. + +Ruby 2.5 has removed the ability to access top-level constants +via a confusing nested form (e.g. `MyClass::Hash`), so we no +longer need this spec there. + +For #1192. +--- + spec/rspec/mocks/mutate_const_spec.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/spec/rspec/mocks/mutate_const_spec.rb b/spec/rspec/mocks/mutate_const_spec.rb +index fe8d4128..9d80dd73 100644 +--- a/spec/rspec/mocks/mutate_const_spec.rb ++++ b/spec/rspec/mocks/mutate_const_spec.rb +@@ -170,7 +170,7 @@ def change_const_value_to(value) + expect(::Hash).to equal(top_level_hash) + end + +- it 'does not affect the ability to access the top-level constant from nested contexts', :silence_warnings do ++ it 'does not affect the ability to access the top-level constant from nested contexts', :silence_warnings, :if => RUBY_VERSION < '2.5' do + top_level_hash = ::Hash + + hide_const("TestClass::Hash") -- cgit v1.2.3-65-gdbad