Forum: Ruby Problems with Net:HTTP class

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D51a24ae1017f53158d70b621494255d?d=identicon&s=25 Bontina Chen (abon)
on 2007-02-02 04:16
I'm testing the http module in console.
BUt I got the following error.
Anyone knows why?

>> Net::HTTP.get_print '', 'index.html'
SystemStackError: stack level too deep
        from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in
        from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in
        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

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

F3b7109c91841c7106784d229418f5dd?d=identicon&s=25 Justin Collins (justincollins)
on 2007-02-02 08:53
(Received via mailing list)
Bontina Chen wrote:
>         from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in
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

This topic is locked and can not be replied to.