aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/options.rb
diff options
context:
space:
mode:
authorMike McQuaid2014-10-16 13:00:20 +0100
committerMike McQuaid2014-10-19 13:58:52 +0100
commit2536c4c347d0785f359beab0a17b7e70993b3076 (patch)
treee64cadea7e0610fa6452a21e82d7843777880fac /Library/Homebrew/options.rb
parent2db08f52e4c71d01e5596e56ac4d19414a7cde3d (diff)
downloadhomebrew-2536c4c347d0785f359beab0a17b7e70993b3076.tar.bz2
Add deprecated_option to software_spec.
Allows remapping one option name to another and updates build options and flags accordingly.
Diffstat (limited to 'Library/Homebrew/options.rb')
-rw-r--r--Library/Homebrew/options.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/options.rb b/Library/Homebrew/options.rb
index edeb5d870..6d6242171 100644
--- a/Library/Homebrew/options.rb
+++ b/Library/Homebrew/options.rb
@@ -47,6 +47,11 @@ class DeprecatedOption
def current_flag
"--#{current}"
end
+
+ def ==(other)
+ instance_of?(other.class) && old == other.old && current == other.current
+ end
+ alias_method :eql?, :==
end
class Options