diff options
author | Krekoten' Marjan <krekoten@gmail.com> | 2010-09-25 10:55:22 +0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-25 11:06:55 +0200 |
commit | 1b7d30bfc925562cffff10db2a0388770e9bc06c (patch) | |
tree | 14bc3c45381e04181d27a421db8d8bc7afad1c46 /activesupport | |
parent | 8639c10a40604cee2f3d412470c2960712fdc809 (diff) | |
download | rails-1b7d30bfc925562cffff10db2a0388770e9bc06c.tar.gz rails-1b7d30bfc925562cffff10db2a0388770e9bc06c.tar.bz2 rails-1b7d30bfc925562cffff10db2a0388770e9bc06c.zip |
Fix 'warning: method redefined' [#5551 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb b/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb index 7b19aa059d..0b6731883c 100644 --- a/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +++ b/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb @@ -21,10 +21,10 @@ class Module def attr_accessor_with_default(sym, default = Proc.new) define_method(sym, block_given? ? default : Proc.new { default }) module_eval(<<-EVAL, __FILE__, __LINE__ + 1) - def #{sym}=(value) # def age=(value) - class << self; attr_reader :#{sym} end # class << self; attr_reader :age end - @#{sym} = value # @age = value - end # end + def #{sym}=(value) # def age=(value) + class << self; attr_accessor :#{sym} end # class << self; attr_accessor :age end + @#{sym} = value # @age = value + end # end EVAL end end |