Ticket #91 (new defect)
Opened 14 months ago
Memory leak with #to_plain_text
| Reported by: | mksm | Owned by: | why |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | lib/hpricot | Version: | |
| Keywords: | Cc: |
Description
I'm parsing a lot of very similar HTML pages. Here's a bit of code:
h = Hpricot(html)
table_fields = []
h.traverse_element('td') do |e|
table_fields << e.to_plain_text.strip.squeeze(" ")
end
Tested with Hpricot 0.6, Linux, Ruby 1.8.6 (2007-03-13 patchlevel 0).
I've switched to #innerHTML and it works fine. Though it doesnt produce the same results.
Regards, mksm
Note: See
TracTickets for help on using
tickets.
