aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorJack Nagel2014-08-28 22:11:08 -0500
committerJack Nagel2014-08-28 22:11:08 -0500
commite18da89f3c4331d65ef32f75c3271242b41246dc (patch)
treec66dc707ee5fb941d817cb20ae29640f93a325fa /Library/Homebrew/extend
parent7a5e4f5ccab58bd6f7b8ff86fdf53e572d7d1723 (diff)
downloadbrew-e18da89f3c4331d65ef32f75c3271242b41246dc.tar.bz2
Implement ARGV.named in terms of ARGV.options_only
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/ARGV.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb
index 25707a2e3..fb96d9abc 100644
--- a/Library/Homebrew/extend/ARGV.rb
+++ b/Library/Homebrew/extend/ARGV.rb
@@ -1,10 +1,10 @@
module HomebrewArgvExtension
def named
- @named ||= reject{|arg| arg[0..0] == '-'}
+ @named ||= self - options_only
end
def options_only
- select {|arg| arg[0..0] == '-'}
+ select { |arg| arg.start_with?("-") }
end
def formulae