Projects
Mega:23.09
rubygem-temple
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:rubygem-temple.spec
Changed
@@ -1,12 +1,13 @@ %global gem_name temple Name: rubygem-%{gem_name} Version: 0.8.0 -Release: 2 +Release: 3 Summary: Template compilation framework in Ruby License: MIT URL: https://github.com/judofyr/temple Source0: https://rubygems.org/gems/temple-%{version}.gem Patch0: rubygem-temple-0.8.2-Use-Erubi-instead-of-Erubis.patch +Patch1: rubygem-temple-0.8.0-object-regexp-removal-ruby32.patch BuildRequires: ruby(release) rubygems-devel ruby rubygem-bacon rubygem(erubi) rubygem(tilt) BuildArch: noarch %description @@ -29,6 +30,7 @@ %setup -q -n %{gem_name}-%{version} %patch0 -p1 +%patch1 -p1 %build gem build ../%{gem_name}-%{version}.gemspec @@ -64,6 +66,9 @@ %{gem_instdir}/test %changelog +* Mon Aug 14 2023 liyanan <thistleslyn@163.com> - 0.8.0-3 +- fix build error with ruby3.2 + * Tue Jan 10 liyanan <liyanan32@h-partners.com> - 0.8.0-2 - Use Erubi instead of Erubis
View file
_service:tar_scm:rubygem-temple-0.8.0-object-regexp-removal-ruby32.patch
Added
@@ -0,0 +1,33 @@ +From 693641fee8d1970abeded5dc59e22b745cfaf269 Mon Sep 17 00:00:00 2001 +From: Yusuke Nakamura <yusuke1994525@gmail.com> +Date: Fri, 10 Jan 2020 01:06:06 +0900 +Subject: PATCH Suppress deprecated warning by Object#=~ since ruby 2.6 + +In `Temple::Mixins::GrammerDSL::Value#Rule`, call `=~` method to +`Class` class then that causes a warning message. +This behavior introduced from ruby 2.6 with `-W` option. +(And ruby 2.7 always show a warning message) + +- https://bugs.ruby-lang.org/issues/15231 +- https://github.com/ruby/ruby/commit/ebff9dc10 + +Therefore use case-when-else clause to avoid warning. +--- + lib/temple/mixins/grammar_dsl.rb | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/lib/temple/mixins/grammar_dsl.rb b/lib/temple/mixins/grammar_dsl.rb +index 0f154f5..d02aa9c 100644 +--- a/lib/temple/mixins/grammar_dsl.rb ++++ b/lib/temple/mixins/grammar_dsl.rb +@@ -143,7 +143,8 @@ def Rule(rule) + start = Or.new(self) + curr = start + rule.each do |elem| +- if elem =~ /^(.*)(\*|\?|\+)$/ ++ case elem ++ when /^(.*)(\*|\?|\+)$/ + elem = Element.new(self, const_get($1)) + curr.each {|c| c << elem } + elem << elem if $2 != '?' +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2