dev-ruby/bogus: fix against erb-6

Closes: https://bugs.gentoo.org/978454
Signed-off-by: Alfred Wingate <parona@protonmail.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1527
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Alfred Wingate
2026-07-26 16:06:28 +01:00
committed by Sam James
parent 50887826d9
commit dadb3949f3
2 changed files with 21 additions and 2 deletions
@@ -1,9 +1,9 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
USE_RUBY="ruby31 ruby32 ruby33 ruby34"
USE_RUBY="ruby32 ruby33 ruby34"
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
@@ -21,6 +21,10 @@ KEYWORDS="~amd64"
ruby_add_rdepend ">=dev-ruby/dependor-0.0.4"
PATCHES=(
"${FILESDIR}"/bogus-0.1.7-erb6.patch
)
all_ruby_prepare() {
sed -i -e '/simplecov/,/^end/ s:^:#:' \
-e '/SimpleCov/,/^end/ s:^:#:' spec/spec_helper.rb || die
@@ -0,0 +1,15 @@
https://github.com/ruby/erb/pull/95
diff --git a/lib/bogus/stubbing/not_all_expectations_satisfied.rb b/lib/bogus/stubbing/not_all_expectations_satisfied.rb
index e358beb..af67652 100644
--- a/lib/bogus/stubbing/not_all_expectations_satisfied.rb
+++ b/lib/bogus/stubbing/not_all_expectations_satisfied.rb
@@ -15,7 +15,7 @@ module Bogus
<% end %>
EOF
str = str.gsub(/ {6}/, '')
- template = ERB.new(str, nil, "<>")
+ template = ERB.new(str, trim_mode: "<>")
new(template.result(binding))
end