mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix 'warning: method redefined' [#5551 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
8639c10a40
commit
1b7d30bfc9
1 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ class Module
|
|||
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
|
||||
class << self; attr_accessor :#{sym} end # class << self; attr_accessor :age end
|
||||
@#{sym} = value # @age = value
|
||||
end # end
|
||||
EVAL
|
||||
|
|
Loading…
Reference in a new issue