diff options
| author | Jack Nagel | 2013-02-17 22:52:39 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-02-18 12:13:34 -0600 |
| commit | f172d3a6eb3c78be87dc3f58786a7db78cd12fca (patch) | |
| tree | 62043c4d38ed4519169608fdad71595bceaab928 /Library/Homebrew/cmd | |
| parent | baffb31aab16e30c850686d42a574495d51cc396 (diff) | |
| download | brew-f172d3a6eb3c78be87dc3f58786a7db78cd12fca.tar.bz2 | |
Don't use deprecated form of attr
The form "attr :name, true" is deprecated and causes Ruby to emit a
warning in verbose mode. Using attr_{reader,writer,accessor} is more
clear anyway, so do so.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/create.rb | 8 |
2 files changed, 3 insertions, 9 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index c8ebad17a..f880db36b 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -73,9 +73,7 @@ class FormulaText end class FormulaAuditor - attr :f - attr :text - attr :problems, true + attr_reader :f, :text, :problems BUILD_TIME_DEPS = %W[ autoconf diff --git a/Library/Homebrew/cmd/create.rb b/Library/Homebrew/cmd/create.rb index 5565cfb11..9f215a0f2 100644 --- a/Library/Homebrew/cmd/create.rb +++ b/Library/Homebrew/cmd/create.rb @@ -71,12 +71,8 @@ module Homebrew extend self end class FormulaCreator - attr :url - attr :sha1 - attr :name, true - attr :version, true - attr :path, true - attr :mode, true + attr_reader :url, :sha1 + attr_accessor :name, :version, :path, :mode def url= url @url = url |
