Projects
openEuler:24.03:SP1:Everything
rubygem-mustermann
_service:tar_scm:mustermann-2.0.2-ruby32-regex_...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:mustermann-2.0.2-ruby32-regex_match-for-object.patch of Package rubygem-mustermann
From 8be5bd4ac3642d9c9582d0a7258f3197fa54bb96 Mon Sep 17 00:00:00 2001 From: Paul Padier <paul.padier@outlook.com> Date: Wed, 20 Jul 2022 22:32:25 +0900 Subject: [PATCH] Don't call #=~ on objects that don't respond to it `Kernel` defined `#=~` up until Ruby 3.2, but it just returned `nil` when the method wasn't redefined by a child class. --- mustermann/lib/mustermann/ast/expander.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mustermann/lib/mustermann/ast/expander.rb b/mustermann/lib/mustermann/ast/expander.rb index 6cb9110..f5ca874 100644 --- a/mustermann/lib/mustermann/ast/expander.rb +++ b/mustermann/lib/mustermann/ast/expander.rb @@ -124,6 +124,8 @@ def error_for(values) # @see Mustermann::AST::Translator#expand # @!visibility private ruby2_keywords def escape(string, *args) + return super unless string.respond_to?(:=~) + # URI::Parser is pretty slow, let's not send every string to it, even if it's unnecessary string =~ /\A\w*\Z/ ? string : super end
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