diff options
| author | Jack Nagel | 2014-08-13 18:16:25 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-08-13 18:16:25 -0500 |
| commit | c913c7bdbba74ac9e64e03f45ad80bbfbfb8a8e8 (patch) | |
| tree | 92301ed0636e4aff0f7561743d641383f59011ba /Library/Homebrew | |
| parent | 8a84e9cc4645b4a0b00227839df12897d5a5e954 (diff) | |
| download | homebrew-c913c7bdbba74ac9e64e03f45ad80bbfbfb8a8e8.tar.bz2 | |
Remove Options#concat
Diffstat (limited to 'Library/Homebrew')
| -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 |
