aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb8
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 683789d853..4d0198f028 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
@@ -22,10 +22,10 @@ class Module
raise 'Default value or block required' unless !default.nil? || block
define_method(sym, block_given? ? block : Proc.new { default })
module_eval(<<-EVAL, __FILE__, __LINE__)
- def #{sym}=(value)
- class << self; attr_reader :#{sym} end
- @#{sym} = value
- end
+ def #{sym}=(value) # def age=(value)
+ class << self; attr_reader :#{sym} end # class << self; attr_reader :age end
+ @#{sym} = value # @age = value
+ end # end
EVAL
end
end