diff options
author | Go MAEDA <maeda@farend.jp> | 2023-12-20 09:23:05 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-12-20 09:23:05 +0000 |
commit | 380444f085d95656347cb4e62d41e851ca8494b9 (patch) | |
tree | 29b59c9e08ff8236b3abdde6396ed704fd68092b /lib/redmine/wiki_formatting | |
parent | 21a48d79f4f116a59283803475a5799e83da6074 (diff) | |
download | redmine-380444f085d95656347cb4e62d41e851ca8494b9.tar.gz redmine-380444f085d95656347cb4e62d41e851ca8494b9.zip |
Fix RuboCop offense Performance/StringIdentifierArgument (#39888).
git-svn-id: https://svn.redmine.org/redmine/trunk@22535 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting')
-rw-r--r-- | lib/redmine/wiki_formatting/textile/redcloth3.rb | 10 |
1 files changed, 5 insertions, 5 deletions
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 # #=>"<h1>A <b>bold</b> man</h1>" # 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 |