From 380444f085d95656347cb4e62d41e851ca8494b9 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Wed, 20 Dec 2023 09:23:05 +0000 Subject: Fix RuboCop offense Performance/StringIdentifierArgument (#39888). git-svn-id: https://svn.redmine.org/redmine/trunk@22535 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/wiki_formatting/textile/redcloth3.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/redmine/wiki_formatting') diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb index e319d90db..f545bdf91 100644 --- a/lib/redmine/wiki_formatting/textile/redcloth3.rb +++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb @@ -255,7 +255,7 @@ class RedCloth3 < String # #=>"

A <b>bold</b> man

" # def initialize( string, restrictions = [] ) - restrictions.each { |r| method( "#{r}=" ).call( true ) } + restrictions.each { |r| method( :"#{r}=" ).call( true ) } super( string ) end @@ -724,10 +724,10 @@ class RedCloth3 < String # pass to prefix handler replacement = nil - if respond_to? "textile_#{tag}", true - replacement = method( "textile_#{tag}" ).call( tag, atts, cite, content ) - elsif respond_to? "textile_#{tagpre}_", true - replacement = method( "textile_#{tagpre}_" ).call( tagpre, num, atts, cite, content ) + if respond_to? :"textile_#{tag}", true + replacement = method( :"textile_#{tag}" ).call( tag, atts, cite, content ) + elsif respond_to? :"textile_#{tagpre}_", true + replacement = method( :"textile_#{tagpre}_" ).call( tagpre, num, atts, cite, content ) end text.gsub!( $& ) { replacement } if replacement end -- cgit v1.2.3