aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-08-20 19:05:49 -0500
committerJack Nagel2014-08-20 19:05:49 -0500
commitaf3d551de7de0615281620e33e157a1e6d4514c2 (patch)
treef8921215e9f68a247ab9fd414e391614e2b7a580 /Library
parent023f02b90a758b147aa75edcca13944033a538c0 (diff)
downloadbrew-af3d551de7de0615281620e33e157a1e6d4514c2.tar.bz2
Options no longer needs deep-copy semantics
Follow-up to 23d90a6a187a57fbdf4eeac146993e3b37c3d4d9.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/options.rb8
-rw-r--r--Library/Homebrew/test/test_options.rb6
2 files changed, 0 insertions, 14 deletions
diff --git a/Library/Homebrew/options.rb b/Library/Homebrew/options.rb
index 8c250e2b3..41f5d555a 100644
--- a/Library/Homebrew/options.rb
+++ b/Library/Homebrew/options.rb
@@ -50,9 +50,6 @@ end
class Options
include Enumerable
- attr_reader :options
- protected :options
-
def self.create(array)
options = new
array.each do |e|
@@ -70,11 +67,6 @@ class Options
@options = Set.new(*args)
end
- def initialize_copy(other)
- super
- @options = other.options.dup
- end
-
def each(*args, &block)
@options.each(*args, &block)
end
diff --git a/Library/Homebrew/test/test_options.rb b/Library/Homebrew/test/test_options.rb
index 1f0af11f6..06d3c246e 100644
--- a/Library/Homebrew/test/test_options.rb
+++ b/Library/Homebrew/test/test_options.rb
@@ -125,10 +125,4 @@ class OptionsTests < Homebrew::TestCase
debug = Option.new("-d")
assert_equal [verbose, debug].sort, Options.create(array).sort
end
-
- def test_copies_do_not_share_underlying_collection
- copy = @options.dup << Option.new("foo")
- assert_empty @options
- assert_equal 1, copy.count
- end
end