summaryrefslogtreecommitdiff
path: root/lib/rubygems/command.rb
diff options
context:
space:
mode:
authorSamuel Giddins <[email protected]>2023-12-13 03:46:10 -0800
committergit <[email protected]>2023-12-13 22:00:26 +0000
commitbaf2ec2ca8127cd610a3681a1e84ebcb404fe8f2 (patch)
tree34f648186b45ea9a4927717d78528586d8848c80 /lib/rubygems/command.rb
parentb266890dab38d12ad52288d5edf60f885ae5b8ce (diff)
[rubygems/rubygems] Use match? when regexp match data is unused
Improved performance / reduced allocations https://github.com/rubygems/rubygems/commit/b04726c9a7
Diffstat (limited to 'lib/rubygems/command.rb')
-rw-r--r--lib/rubygems/command.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/command.rb b/lib/rubygems/command.rb
index 1320d9f49f..06ec2a5bdd 100644
--- a/lib/rubygems/command.rb
+++ b/lib/rubygems/command.rb
@@ -190,7 +190,7 @@ class Gem::Command
"Please specify at least one gem name (e.g. gem build GEMNAME)"
end
- args.select {|arg| arg !~ /^-/ }
+ args.reject {|arg| arg.start_with?("-") }
end
##