Blame SOURCES/rubygem-mocha-2.6.1-Support-single-quote-instead-of-backtick-for-Ruby-3.4.patch

e4eb36
From db6229c1325d6ba762e628a3ba9b44759b36fba5 Mon Sep 17 00:00:00 2001
e4eb36
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
e4eb36
Date: Fri, 6 Dec 2024 18:49:42 +0100
e4eb36
Subject: [PATCH] Support single quote instead of backtick for Ruby 3.4
e4eb36
e4eb36
Use a single quote instead of a backtick as an opening quote.
e4eb36
[[Feature #16495](https://bugs.ruby-lang.org/]issues/16495)]
e4eb36
---
e4eb36
 test/integration/shared_tests.rb | 4 +++-
e4eb36
 1 file changed, 3 insertions(+), 1 deletion(-)
e4eb36
e4eb36
diff --git a/test/integration/shared_tests.rb b/test/integration/shared_tests.rb
e4eb36
index 5107c3b8..0d4d972f 100644
e4eb36
--- a/test/integration/shared_tests.rb
e4eb36
+++ b/test/integration/shared_tests.rb
e4eb36
@@ -156,6 +156,8 @@ module SharedTests
e4eb36
   end
e4eb36
 
e4eb36
   def test_real_object_expectation_does_not_leak_into_subsequent_test
e4eb36
+    opening_quote = Mocha::RUBY_V34_PLUS ? "'" : '`'
e4eb36
+
e4eb36
     execution_point = nil
e4eb36
     klass = Class.new
e4eb36
     test_result = run_as_tests(
e4eb36
@@ -170,7 +172,7 @@ module SharedTests
e4eb36
     assert_errored(test_result)
e4eb36
     exception = test_result.errors.first.exception
e4eb36
     assert_equal execution_point, ExecutionPoint.new(exception.backtrace)
e4eb36
-    assert_match(/undefined method `foo'/, exception.message)
e4eb36
+    assert_match(/undefined method #{opening_quote}foo'/, exception.message)
e4eb36
   end
e4eb36
 
e4eb36
   def test_leaky_mock