Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/lib/nokogiri/xml/node_set.rb b/lib/nokogiri/xml/node_set.rb
index 37b3848..149e90e 100644
--- a/lib/nokogiri/xml/node_set.rb
+++ b/lib/nokogiri/xml/node_set.rb
@@ -240,6 +240,14 @@ module Nokogiri
end
end
+ def map
+ a = []
+ length.times do |x|
+ a << yield(self[x])
+ end
+ a
+ end
+
###
# Get the inner text of all contained Node objects
def inner_text
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.