From 739e7026a356d6a0b710af11276d9b7dba52405b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 11 May 2011 09:25:55 -0700 Subject: [PATCH] just yield rather than calling the block --- lib/nokogiri/xml/reader.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/nokogiri/xml/reader.rb b/lib/nokogiri/xml/reader.rb index 49755d8ab6..2b545f5047 100644 --- a/lib/nokogiri/xml/reader.rb +++ b/lib/nokogiri/xml/reader.rb @@ -101,10 +101,10 @@ def attribute_nodes end ### - # Move the cursor through the document yielding each node to the block - def each(&block) - while node = self.read - block.call(node) + # Move the cursor through the document yielding the cursor to the block + def each + while cursor = self.read + yield cursor end end end