Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeSet#slice doesn't handle ranges beyond the end of the array #131

Closed
gpherguson opened this issue Sep 3, 2009 · 1 comment
Closed

Comments

@gpherguson
Copy link
Contributor

Looks like NodeSet#slice isn't handling range beyond the end of the array...

#!/usr/bin/env ruby

require 'rubygems'
require 'nokogiri'

xml = Nokogiri::XML('<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
    <item><title>t1</title></item>
    <item><title>t2</title></item>
   </channel>
</rss>
')
items = (xml/:item)
not_blowed_up = items[0, items.size]
all_blowed_up = items[0, 100]
@tenderlove
Copy link
Member

fixing node slices where the slice is larger than the node set length. closed by 9f04464

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants