aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorAdam Vandenberg2010-07-13 07:31:43 -0700
committerAdam Vandenberg2010-08-07 18:08:51 -0700
commitf990f083e8758019b7513605d54af6ae129cc913 (patch)
tree1cd600be3e791efa849b117c59ed4270d24ba21c /Library/Homebrew/extend
parent6612a049174af69d0a4103e4db84ea385f447bbe (diff)
downloadbrew-f990f083e8758019b7513605d54af6ae129cc913.tar.bz2
ARGV - rename method that conflicts with optparse
optparse adds an "options" method to ARGV, and so does Homebrew. Rename this method (and remove optparse blocking script) so that Homebrew plays nicer with external Ruby software. This fixes the issue where "gem install thin" would break "brew server", for instance.
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 352f5d03d..d39df7d7f 100644
--- a/Library/Homebrew/extend/ARGV.rb
+++ b/Library/Homebrew/extend/ARGV.rb
@@ -7,7 +7,7 @@ module HomebrewArgvExtension
@named ||= reject{|arg| arg[0..0] == '-'}
end
- def options
+ def options_only
select {|arg| arg[0..0] == '-'}
end
@@ -59,7 +59,7 @@ module HomebrewArgvExtension
end
def flag? flag
- options.each do |arg|
+ options_only.each do |arg|
return true if arg == flag
next if arg[1..1] == '-'
return true if arg.include? flag[2..2]