diff options
author | Petrik <petrik@deheus.net> | 2023-06-14 22:39:47 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-06-14 23:47:25 +0000 |
commit | 0c55ef11509d0cf480ef46b98965a63f6499c6bd (patch) | |
tree | e64900fda1bf2f1679bebc712a0f2edf8d8453cf /test/rdoc/test_rdoc_markup_to_html.rb | |
parent | c2f4b414804a4ccd3edeec87e6998beb60c002bb (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.rb | 4 |
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) |