Skip to content

Commit

Permalink
don't try add_extensions on plain objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
Darrick Wiebe committed Jan 17, 2011
1 parent 7163913 commit 6e1c44f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/pacer/core/route.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@ def each_element
else
if block_given?
while item = iter.next
item.graph ||= g if g and item.respond_to? :graph=
yield item.add_extensions(extensions)
if item.respond_to? :graph=
item.graph ||= g if g and item.respond_to? :graph=
item = item.add_extensions(extensions)
end
yield item
end
else
iter.extend IteratorExtensionsMixin
Expand Down

0 comments on commit 6e1c44f

Please sign in to comment.