From aacf2581cde0147dc66c3eeacf6d7447c2bbafdf Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 19 May 2010 16:37:41 -0300 Subject: refactor evals and adds some __FILE__ and __LINE__ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- activesupport/lib/active_support/core_ext/class/attribute.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/class') diff --git a/activesupport/lib/active_support/core_ext/class/attribute.rb b/activesupport/lib/active_support/core_ext/class/attribute.rb index d2bcd7a778..576366e496 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute.rb @@ -61,10 +61,7 @@ class Class end RUBY - if instance_writer - body = "def #{name}=(value) @#{name} = value end" - class_eval body, __FILE__, __LINE__ - 1 - end + attr_writer name if instance_writer end end end -- cgit v1.2.3