Created
February 15, 2012 00:10
-
-
Save ender672/1831918 to your computer and use it in GitHub Desktop.
1.9.3-p0 nokogiri segfault fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/nokogiri/xml/node_set.rb b/lib/nokogiri/xml/node_set.rb | |
index 37b3848..cb99cdd 100644 | |
--- a/lib/nokogiri/xml/node_set.rb | |
+++ b/lib/nokogiri/xml/node_set.rb | |
@@ -234,8 +234,8 @@ module Nokogiri | |
### | |
# Iterate over each node, yielding to +block+ | |
- def each(&block) | |
- 0.upto(length - 1) do |x| | |
+ def each | |
+ length.times do |x| | |
yield self[x] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment