public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-ruby/contracts/files/
@ 2025-08-10  8:40 Hans de Graaff
  0 siblings, 0 replies; only message in thread
From: Hans de Graaff @ 2025-08-10  8:40 UTC (permalink / raw
  To: gentoo-commits

commit:     4e0bf19e6a02643a90a9ba5d9c60928cec36e2e2
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 10 08:40:04 2025 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sun Aug 10 08:40:04 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e0bf19e

dev-ruby/contracts: add missing patch file

Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 .../contracts/files/contracts-0.17.2-ruby34.patch  | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/dev-ruby/contracts/files/contracts-0.17.2-ruby34.patch b/dev-ruby/contracts/files/contracts-0.17.2-ruby34.patch
new file mode 100644
index 000000000000..5ea56d616ae6
--- /dev/null
+++ b/dev-ruby/contracts/files/contracts-0.17.2-ruby34.patch
@@ -0,0 +1,27 @@
+From b2ffcca90ffa9fbf4a7293065a8926e7b13ac9f2 Mon Sep 17 00:00:00 2001
+From: PikachuEXE <git@pikachuexe.net>
+Date: Wed, 27 Nov 2024 09:39:28 +0800
+Subject: [PATCH] ! Fix a failed test case in 3.4 due to error message format
+ diff in ruby 3.4
+
+---
+ spec/ruby_version_specific/contracts_spec_2.1.rb | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/spec/ruby_version_specific/contracts_spec_2.1.rb b/spec/ruby_version_specific/contracts_spec_2.1.rb
+index 36b6ede..01180c8 100644
+--- a/spec/ruby_version_specific/contracts_spec_2.1.rb
++++ b/spec/ruby_version_specific/contracts_spec_2.1.rb
+@@ -56,7 +56,11 @@ def complicated(a, b = true, *c, d, e:, f:2, **g, &h)
+           @o.complicated("a", true, :b, :c, 2.0, e: (1..5), f: nil, g: :d) do |x|
+             x
+           end
+-        end.to raise_error(ContractError, /Expected: \(KeywordArgs\[{:e=>Range, :f=>Optional\[Num\], :g=>Symbol}\]\)/)
++        end.to raise_error(
++          ContractError,
++          # 3.3- vs 3.4+ error message format
++          /(Expected: \(KeywordArgs\[{:e=>Range, :f=>Optional\[Num\], :g=>Symbol}\]\)|Expected: \(KeywordArgs\[{e: Range, f: Optional\[Num\], g: Symbol}\]\))/,
++        )
+       end
+     end
+   end


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-10  8:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-10  8:40 [gentoo-commits] repo/gentoo:master commit in: dev-ruby/contracts/files/ Hans de Graaff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox