From 133b9382f0545672540e6b0729370e48769e52c1 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Sun, 17 Mar 2024 09:29:40 -0700 Subject: [PATCH] Improve readability --- Library/Homebrew/sorbet/tapioca/compilers/args.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/sorbet/tapioca/compilers/args.rb b/Library/Homebrew/sorbet/tapioca/compilers/args.rb index 215da283fd..b79843eb8f 100644 --- a/Library/Homebrew/sorbet/tapioca/compilers/args.rb +++ b/Library/Homebrew/sorbet/tapioca/compilers/args.rb @@ -8,9 +8,9 @@ module Tapioca module Compilers class Args < Tapioca::Dsl::Compiler GLOBAL_OPTIONS = T.let( - Homebrew::CLI::Parser.global_options.map { _1.slice(0, 2) }.flatten - .map { "#{Homebrew::CLI::Parser.option_to_name(_1)}?" }.freeze, - T::Array[String], + Homebrew::CLI::Parser.global_options.map do |short_option, long_option, _| + [short_option, long_option].map { "#{Homebrew::CLI::Parser.option_to_name(_1)}?" } + end.flatten.freeze, T::Array[String] ) # This is ugly, but we're moving to a new interface that will use a consistent DSL