From 0a2be32d802073ef46596792a46f7139bb862a8c Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 12 Aug 2014 23:55:28 -0500 Subject: [PATCH] Remove unused branches from Options.coerce --- Library/Homebrew/options.rb | 2 -- Library/Homebrew/test/test_options.rb | 9 --------- 2 files changed, 11 deletions(-) diff --git a/Library/Homebrew/options.rb b/Library/Homebrew/options.rb index 6b982a4059..86be67ea93 100644 --- a/Library/Homebrew/options.rb +++ b/Library/Homebrew/options.rb @@ -116,8 +116,6 @@ class Options def self.coerce(arg) case arg - when self then arg - when Option then new << arg when Array opts = new arg.each do |a| diff --git a/Library/Homebrew/test/test_options.rb b/Library/Homebrew/test/test_options.rb index 4b99158748..250360a307 100644 --- a/Library/Homebrew/test/test_options.rb +++ b/Library/Homebrew/test/test_options.rb @@ -132,15 +132,6 @@ class OptionsTests < Homebrew::TestCase assert_equal [foo, bar, baz].sort, (@options | options).to_a.sort end - def test_coerce_with_options - assert_same @options, Options.coerce(@options) - end - - def test_coerce_with_option - option = Option.new("foo") - assert_equal option, Options.coerce(option).to_a.first - end - def test_coerce_with_array array = %w{--foo --bar} option1 = Option.new("foo")