# Development hpricot breaks code

**URL:** <https://www.ruby-forum.com/t/development-hpricot-breaks-code/78154>\
**Category:** Ruby\
**Created:** [December 3, 2006, 2:35am UTC](https://www.ruby-forum.com/t/development-hpricot-breaks-code/78154 "2006-12-03T02:35:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 3, 2006, 2:35am UTC](https://www.ruby-forum.com/t/development-hpricot-breaks-code/78154/1 "2006-12-03T02:35:41Z")

</div>

I was using this simple script to parse some links from a web page

require ‘open-uri’  
require ‘hpricot’

strLink = “[http://sportsline.com/nfl/scoreboard/2006/week9](http://sportsline.com/nfl/scoreboard/2006/week9)”

@doc = Hpricot(open(strLink))

@doc.search(“a”).each do |a|

```
if a.inner_html.include?"GameCenter"
  puts 'http://sportsline.com' + a.attributes['href']
end

```

end

The script worked fine with the stable gem (0.4) but breaks with the  
development gem (4.76). Unfortunately, I cannot find any documentation  
that tells me what has changed between them

Any ideas would be greatly appreciated.

thanks,

Luis

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 3, 2006, 2:41am UTC](https://www.ruby-forum.com/t/development-hpricot-breaks-code/78154/2 "2006-12-03T02:41:42Z")

</div>

File a bug on the Hpricot trac:

[http://code.whytheluckystiff.net/hpricot/report](http://code.whytheluckystiff.net/hpricot/report)

Be sure to include more information, for example the exact error  
message, and preferably the smallest piece of code to reproduce said  
error.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 3, 2006, 3:01am UTC](https://www.ruby-forum.com/t/development-hpricot-breaks-code/78154/3 "2006-12-03T03:01:44Z")

</div>

Positive. The script works correctly with include? Does not work with  
index.

Luis

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 3, 2006, 8:52am UTC](https://www.ruby-forum.com/t/development-hpricot-breaks-code/78154/4 "2006-12-03T08:52:10Z")

</div>

On Sun, Dec 03, 2006 at 10:35:05AM +0900, removed\_email\_address@domain.invalid wrote:

> The script worked fine with the stable gem (0.4) but breaks with the  
> development gem (4.76). Unfortunately, I cannot find any documentation  
> that tells me what has changed between them

Hey, thanks, this was a problem with script tags found inside javascript  
blocks.  
Speaking particularly of, uh, this here at line 534:

This is fixed in the repository. Can you checkout from  
[http://code.whytheluckystiff.net/svn/hpricot/trunk](http://code.whytheluckystiff.net/svn/hpricot/trunk) and see if it has  
healed??  
Doing `rake install` will make the gem and install it.

\_why

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 3, 2006, 2:45am UTC](https://www.ruby-forum.com/t/development-hpricot-breaks-code/78154/5 "2006-12-03T02:45:43Z")

</div>

removed\_email\_address@domain.invalid wrote:

> ```
> if a.inner_html.include?"GameCenter"
> puts 'http://sportsline.com' + a.attributes['href']
> end
> 
> ```
> 
> end

Are sure you want to use ‘include?’ and not ‘index’ ?

T.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 3, 2006, 5:26pm UTC](https://www.ruby-forum.com/t/development-hpricot-breaks-code/78154/6 "2006-12-03T17:26:57Z")

</div>

\_why wrote:

> ```
> if (switchTacoda != 'off') {
> document.write('<script src="http://an.tacoda.net/an/12026/slf.js"
> 
> ```
> 
> language=“JavaScript”\>\</script\>');  
> }
> 
> This is fixed in the repository. Can you checkout from  
> [http://code.whytheluckystiff.net/svn/hpricot/trunk](http://code.whytheluckystiff.net/svn/hpricot/trunk) and see if it has healed??  
> Doing `rake install` will make the gem and install it.
> 
> \_why

After I figured out how to get the svn code in my windows box I ran the  
rake install and get the following error

rake package  
rake aborted!  
undefined method `exitstatus’ for nil:NilClass  
C:/temp2/hpricot/rakefile:169  
(See full trace by running task with --trace)

thanks,

Luis
