Issue #3329 has been updated by John Rowell.


This may be happening due to character encodings. A

    res = xslt.transform(page.search('//body'))

(where 'page' is a Mechanize instance) causes a segfault, while a

    res = xslt.transform(Nokogiri::HTML(page.content, nil, page.encoding))

does not. The original page is encoded with ISO-8859-1, and Mechanize doesn't always convert text to UTF-8 (#text is converted, #content is not). Maybe libxslt only accepts UTF-8 and Nokogiri is not properly converting the encodings before sending the text.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/3329

----------------------------------------
http://redmine.ruby-lang.org