Forum: Ruby Hpricot problems

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
2732f4ccd108e84cc54f70d78de73e6e?d=identicon&s=25 Dean Kassmann (Guest)
on 2007-02-20 23:57
(Received via mailing list)
Has anyone successfully used Hpricot call multiple pages in the same
ruby script:

# begin code

require 'hpricot'
require 'open-uri'

url = ""
N = 5

page = nil

for counter in (0..N)

    puts counter.to_s() + "> checking " + url
    page = Hpricot( open( url ) )


# end code

I end up with the following error:

>ruby test.rb
0> checking
1> checking
2> checking
3> checking
[BUG] Segmentation fault
ruby 1.8.2 (2004-12-25) [i386-mswin32]

This application has requested the Runtime to terminate it in an unusual
Please contact the application's support team for more information.

Any pointers?
This topic is locked and can not be replied to.