[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problems with Net:HTTP class

Bontina Chen

2/2/2007 3:16:00 AM

I'm testing the http module in console.
BUt I got the following error.
Anyone knows why?

>> Net::HTTP.get_print 'www.google.com', 'index.html'
SystemStackError: stack level too deep
from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in
`newobj'
from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in
`newobj'
from C:/InstantRails/ruby/lib/ruby/1.8/net\http.rb:451:in `new'
from C:/InstantRails/ruby/lib/ruby/1.8/net\http.rb:374:in
`get_response'

from C:/InstantRails/ruby/lib/ruby/1.8/net\http.rb:337:in
`get_print'
from (irb):2

THX

--
Posted via http://www.ruby-....

1 Answer

Justin Collins

2/2/2007 7:45:00 AM

0

Bontina Chen wrote:
> I'm testing the http module in console.
> BUt I got the following error.
> Anyone knows why?
>
>
>>> Net::HTTP.get_print 'www.google.com', 'index.html'
>>>
> SystemStackError: stack level too deep
> from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in
> `newobj'
> from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in
> `newobj'
> from C:/InstantRails/ruby/lib/ruby/1.8/net\http.rb:451:in `new'
> from C:/InstantRails/ruby/lib/ruby/1.8/net\http.rb:374:in
> `get_response'
>
> from C:/InstantRails/ruby/lib/ruby/1.8/net\http.rb:337:in
> `get_print'
> from (irb):2
>
> THX
>

Some kind of recursive loop, it looks like. The code worked for me, in
Ruby 1.8.5, but I'm not using Instant Rails - maybe there's an issue there?

-Justin