summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_markup_to_html.rb
diff options
context:
space:
mode:
authorPetrik <petrik@deheus.net>2023-06-14 22:39:47 +0200
committergit <svn-admin@ruby-lang.org>2023-06-14 23:47:25 +0000
commit0c55ef11509d0cf480ef46b98965a63f6499c6bd (patch)
treee64900fda1bf2f1679bebc712a0f2edf8d8453cf /test/rdoc/test_rdoc_markup_to_html.rb
parentc2f4b414804a4ccd3edeec87e6998beb60c002bb (diff)
[ruby/rdoc] Use flat_map for better performance
https://github.com/ruby/rdoc/commit/76192a280d
Diffstat (limited to 'test/rdoc/test_rdoc_markup_to_html.rb')
-rw-r--r--test/rdoc/test_rdoc_markup_to_html.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/rdoc/test_rdoc_markup_to_html.rb b/test/rdoc/test_rdoc_markup_to_html.rb
index 935a7d70c5..6897c8132e 100644
--- a/test/rdoc/test_rdoc_markup_to_html.rb
+++ b/test/rdoc/test_rdoc_markup_to_html.rb
@@ -602,9 +602,9 @@ end
end
def test_accept_verbatim_redefinable_operators
- functions = %w[| ^ & <=> == === =~ > >= < <= << >> + - * / % ** ~ +@ -@ [] []= ` ! != !~].map { |redefinable_op|
+ functions = %w[| ^ & <=> == === =~ > >= < <= << >> + - * / % ** ~ +@ -@ [] []= ` ! != !~].flat_map { |redefinable_op|
["def #{redefinable_op}\n", "end\n"]
- }.flatten
+ }
verb = @RM::Verbatim.new(*functions)