Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
1.9.3-p0 nokogiri segfault fix
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
You can’t perform that action at this time.