Permalink
Browse files

Merge pull request #220 from reevoo/master

Performance fix for AttributeSet#each.
  • Loading branch information...
solnic committed Jan 6, 2014
2 parents 0c3c860 + c2dc794 commit 79f66db6fbf4502253881911f1c09cfbb79a3a12
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/virtus/attribute_set.rb
@@ -43,7 +43,7 @@ def initialize(parent = nil, attributes = [])
# @api public
def each
return to_enum unless block_given?
- @index.values.uniq.each { |attribute| yield attribute }
+ @index.each { |name, attribute| yield attribute if name.kind_of?(Symbol) }
self
end

0 comments on commit 79f66db

Please sign in to comment.