--
You received this message because you are subscribed to the Google Groups "nokogiri-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nokogiri-talk+unsubscribe@googlegroups.com.
To post to this group, send email to nokogi...@googlegroups.com.
Visit this group at https://groups.google.com/group/nokogiri-talk.
For more options, visit https://groups.google.com/d/optout.
Hi Andrew,Thanks for asking this question. This seems like a bug to me. Would you mind opening a github issue?
On Jun 9, 2017 8:02 AM, "Andrew Derenge" <arde...@gmail.com> wrote:
Hi, first time poster so please let me know if I should be asking this somewhere else or should be phrasing my question differently.When using first on a NodeSet with an argument, I am receiving nils in the array. I would expect the behavior to be similar to the ruby doc enumerable description of first.An example from ruby doc being:
%w[foo bar baz].first(10) #=> ["foo", "bar", "baz"]What I expect:Nokogiri::HTML('<a></a><a></a>').css('a').first(3)[#<Nokogiri::XML::Element:0x3fc3dfd5f1c8 name="a">, #<Nokogiri::XML::Element:0x3fc3dfd5f1b4 name="a">]What I get:[#<Nokogiri::XML::Element:0x3fc3dfd5f1c8 name="a">, #<Nokogiri::XML::Element:0x3fc3dfd5f1b4 name="a">, nil]Nokogiri::HTML('<a></a><a></a>').css('a').first(3)Is this expected behavior?Thanks for reading and any direction would be appreciated!
--
You received this message because you are subscribed to the Google Groups "nokogiri-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nokogiri-tal...@googlegroups.com.