Permalink
Browse files

flatten not needed here

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent ff522cf commit edbb9526d315444d560362487b78e03b2f3d7a61 @spastorino spastorino committed with josevalim Mar 27, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/core_ext/class/attribute_accessors.rb
@@ -11,7 +11,7 @@
class Class
def cattr_reader(*syms)
options = syms.extract_options!
- syms.flatten.each do |sym|
+ syms.each do |sym|
class_eval(<<-EOS, __FILE__, __LINE__ + 1)
unless defined? @@#{sym} # unless defined? @@hair_colors
@@#{sym} = nil # @@hair_colors = nil
@@ -33,7 +33,7 @@ def #{sym} # def hair_colors
def cattr_writer(*syms)
options = syms.extract_options!
- syms.flatten.each do |sym|
+ syms.each do |sym|
class_eval(<<-EOS, __FILE__, __LINE__ + 1)
unless defined? @@#{sym} # unless defined? @@hair_colors
@@#{sym} = nil # @@hair_colors = nil

0 comments on commit edbb952

Please sign in to comment.