Permalink
Browse files

Fixed conflict with Glue gem #1606 [Rick Olson]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1675 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 6e319cc commit 00739dee173a675a9da94ec4c9c9e2866715fb41 @dhh dhh committed Jul 4, 2005
Showing with 5 additions and 3 deletions.
  1. +2 −0 activesupport/CHANGELOG
  2. +3 −3 activesupport/lib/active_support/class_attribute_accessors.rb
View
@@ -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]
@@ -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 @@ def call_#{sym.id2name}
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 @@ def cattr_accessor(*syms)
cattr_reader(*syms)
cattr_writer(*syms)
end
-end
+end

0 comments on commit 00739de

Please sign in to comment.