From 2311181b54ef968339923bcf7a214cd110010520 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 13 Aug 2014 18:16:25 -0500 Subject: [PATCH] Remove Options#concat --- Library/Homebrew/options.rb | 5 ----- Library/Homebrew/test/test_options.rb | 20 -------------------- 2 files changed, 25 deletions(-) diff --git a/Library/Homebrew/options.rb b/Library/Homebrew/options.rb index a612f27fef..871d483e18 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 3f7d8d6c86..1f0af11f66 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