diff options
| author | Jack Nagel | 2014-08-13 18:16:25 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-08-13 18:16:25 -0500 |
| commit | 2311181b54ef968339923bcf7a214cd110010520 (patch) | |
| tree | d33272d408cb0fd676be918d8a1d69469ab5b04b /Library | |
| parent | 0d6ceaf86ea5987fd78db80d8aca95dc86b4b6f0 (diff) | |
| download | brew-2311181b54ef968339923bcf7a214cd110010520.tar.bz2 | |
Remove Options#concat
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/options.rb | 5 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_options.rb | 20 |
2 files changed, 0 insertions, 25 deletions
diff --git a/Library/Homebrew/options.rb b/Library/Homebrew/options.rb index a612f27fe..871d483e1 100644 --- a/Library/Homebrew/options.rb +++ b/Library/Homebrew/options.rb @@ -116,11 +116,6 @@ class Options any? { |opt| opt == o || opt.name == o || opt.flag == o } end - def concat(o) - @options.merge(o) - self - end - alias_method :to_ary, :to_a def inspect diff --git a/Library/Homebrew/test/test_options.rb b/Library/Homebrew/test/test_options.rb index 3f7d8d6c8..1f0af11f6 100644 --- a/Library/Homebrew/test/test_options.rb +++ b/Library/Homebrew/test/test_options.rb @@ -98,26 +98,6 @@ class OptionsTests < Homebrew::TestCase assert_equal [option], @options.to_ary end - def test_concat_array - option = Option.new("foo") - @options.concat([option]) - assert_includes @options, option - assert_equal [option], @options.to_a - end - - def test_concat_options - option = Option.new("foo") - opts = Options.new - opts << option - @options.concat(opts) - assert_includes @options, option - assert_equal [option], @options.to_a - end - - def test_concat_returns_self - assert_same @options, (@options.concat([])) - end - def test_intersection foo, bar, baz = %w{foo bar baz}.map { |o| Option.new(o) } options = Options.new << foo << bar |
