aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/CHANGELOG2
-rw-r--r--activesupport/lib/active_support/class_attribute_accessors.rb6
2 files changed, 5 insertions, 3 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG
index 2f9948eb0e..97cf400dfe 100644
--- a/activesupport/CHANGELOG
+++ b/activesupport/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed conflict with Glue gem #1606 [Rick Olson]
+
* Added new rules to the Inflector to deal with more unusual plurals mouse/louse => mice/lice, information => information, ox => oxen, virus => viri, archive => archives #1571, #1583, #1490, #1599 [foamdino@gmail.com/others]
* Fixed memory leak with Object#remove_subclasses_of, which inflicted a Rails application running in development mode with a ~20KB leak per request #1289 [c.r.mcgrath@gmail.com]
diff --git a/activesupport/lib/active_support/class_attribute_accessors.rb b/activesupport/lib/active_support/class_attribute_accessors.rb
index 786dcf98cb..bb043f8e98 100644
--- a/activesupport/lib/active_support/class_attribute_accessors.rb
+++ b/activesupport/lib/active_support/class_attribute_accessors.rb
@@ -2,7 +2,7 @@
# just like the native attr* accessors for instance attributes.
class Class # :nodoc:
def cattr_reader(*syms)
- syms.each do |sym|
+ syms.select { |sym| sym.respond_to?(:id2name) }.each do |sym|
class_eval <<-EOS
if ! defined? @@#{sym.id2name}
@@#{sym.id2name} = nil
@@ -29,7 +29,7 @@ class Class # :nodoc:
end
def cattr_writer(*syms)
- syms.each do |sym|
+ syms.select { |sym| sym.respond_to?(:id2name) }.each do |sym|
class_eval <<-EOS
if ! defined? @@#{sym.id2name}
@@#{sym.id2name} = nil
@@ -54,4 +54,4 @@ class Class # :nodoc:
cattr_reader(*syms)
cattr_writer(*syms)
end
-end \ No newline at end of file
+end