summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch')
-rw-r--r--dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch27
1 files changed, 27 insertions, 0 deletions
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 <myron.marston@gmail.com>
+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")