Ticket #141 (new enhancement)

Opened 7 months ago

Last modified 8 weeks ago

[PATCH] Make Hpricot compile and test suite pass on Ruby 1.9

Reported by: michaelklishin Owned by: why
Priority: critical Milestone:
Component: lib/hpricot Version:
Keywords: ruby1.9, patch Cc:

Description

_why,

Here's a very dirty patch to make Hpricot work fine on Ruby 1.9. Test suite passes and everything works without any spotted problems on my existing projects using Hpricot.

It is very raw yet and I want to come up with better documentation than what I have written just to get my head around the code base.

Have a look: http://pastie.org/148178

Any changes you want me to make?

Change History

Changed 3 months ago by rogerdpack

this would indeed be nice. For some reason it doesn't seem to patch right for me:

~/19/hpricot patch -p0 < pastie-148178.diff patching file test/test_parser.rb Hunk #1 succeeded at 74 (offset 7 lines). Hunk #2 succeeded at 380 (offset 7 lines). patching file ext/hpricot_scan/hpricot_scan.rl Hunk #1 succeeded at 8 with fuzz 2. Hunk #2 FAILED at 56. Hunk #4 FAILED at 184. Hunk #8 FAILED at 251. 3 out of 9 hunks FAILED -- saving rejects to file ext/hpricot_scan/hpricot_scan.rl.rej patching file lib/hpricot/tags.rb patching file lib/hpricot/parse.rb patching file lib/hpricot/tag.rb patching file lib/hpricot/elements.rb Hunk #6 FAILED at 260. patch unexpectedly ends in middle of line Hunk #7 succeeded at 404 with fuzz 2. 1 out of 7 hunks FAILED -- saving rejects to file lib/hpricot/elements.rb.rej

Changed 2 months ago by rogerdpack

Definitely still needs some love for 1.9

....E.E...E.EE/Users/rogerpack/dev/hpricot_svn/lib/hpricot/parse.rb:52: [BUG] Segmentation fault ruby 1.9.0 (2008-06-13 revision 17102) [i686-darwin9.3.0]

Note also that currently running rake in the svn directory fails, and you must run rake rake install rake to actually get it to build. Might be worth looking into.

Changed 8 weeks ago by rogerdpack

looks like there may be a '1.9 patched version' http://github.com/manveru/hpricot/tree/master Also note there appear to be a few more 1.9 related patches in other tickets.

Note: See TracTickets for help on using tickets.