Protocol.rb error


(Tobi Reif) #1

Hi,

I got

···

/usr/local/lib/ruby/1.6/net/protocol.rb:583:in read': undefined local variable or methodigneof’ for #Net::NetPrivate::Socket:0x4036703c
(NameError)
from /usr/local/lib/ruby/1.6/net/http.rb:1146:in read_body_0' from /usr/local/lib/ruby/1.6/net/http.rb:1118:inread_body’
from /usr/local/lib/ruby/1.6/net/http.rb:466:in get' from /usr/local/lib/ruby/1.6/net/http.rb:464:inrequest’
from /usr/local/lib/ruby/1.6/net/http.rb:491:in common_oper' from /usr/local/lib/ruby/1.6/net/http.rb:491:inrequest’
from /usr/local/lib/ruby/1.6/net/http.rb:464:in `get’
[…]

line 583 is

raise unless igneof

in


 def read( len, dest = '', ignerr = false )
   D_off "reading #{len} bytes..."

   rsize = 0
   begin
     while rsize + @buffer.size < len do
       rsize += rbuf_moveto( dest, @buffer.size )
       rbuf_fill
     end
     rbuf_moveto dest, len - rsize
   rescue EOFError
     raise unless igneof
   end

   D_on "read #{len} bytes"
   dest
 end

on Linux.

Tobi


http://www.pinkjuice.com/


(Ned Konz) #2

And should be “raise unless ignore”. But I’m wondering which version
of 1.6 you have; that’s at line 521 in my 1.6.7 version.

···

On Saturday 29 June 2002 09:17 am, Tobias Reif wrote:

line 583 is

raise unless igneof


Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE


(ts) #3

And should be "raise unless ignore". But I'm wondering which version
of 1.6 you have; that's at line 521 in my 1.6.7 version.

Probably 1.6.4

···

Wed Sep 19 17:46:42 2001 Yukihiro Matsumoto <matz@ruby-lang.org>

  * stable version 1.6.5 released.

Sun Jul 8 16:05:36 2001 Minero Aoki <aamine@loveruby.net>

  * lib/net/protocol.rb (ProtoSocket#read): modify typo.

Mon Jun 4 17:57:56 2001 Yukihiro Matsumoto <matz@ruby-lang.org>

  * stable version 1.6.4 released.

Guy Decoux


(Tobi Reif) #4

Ned Konz wrote:

And should be “raise unless ignore”. But I’m wondering which version
of 1.6 you have; that’s at line 521 in my 1.6.7 version.

But in 1.6.7 it was correct, was it?

Tobi

···


http://www.pinkjuice.com/


(ts) #5

But in 1.6.7 it was correct, was it?

pigeon% cat -n ruby-1.6.7/lib/net/protocol.rb
[...]
   510 def read( len, dest = '', ignore = false )
   511 D_off "reading #{len} bytes..."
   512
   513 rsize = 0
   514 begin
   515 while rsize + @rbuf.size < len do
   516 rsize += rbuf_moveto(dest, @rbuf.size)
   517 rbuf_fill
   518 end
   519 rbuf_moveto dest, len - rsize
   520 rescue EOFError
   521 raise unless ignore
   522 end
   523
   524 D_on "read #{len} bytes"
   525 dest
   526 end
[...]
pigeon%

Guy Decoux


(Thomas A. Reilly) #6

I’ve been unable how to figure out using a menu with tk. Nothing I tried
seems to work.

I’d appreciate it if some one could email me a snipit of ruby code using tk
menus.

Thanks


(Tobi Reif) #7

Thanks Guy and Ned; yes I had 1.6.4, and now have 1.6.7.


(Joel VanderWerf) #8

Thomas A. Reilly wrote:

I’d appreciate it if some one could email me a snipit of ruby code using
tk menus.

There’s an example here:

http://www.ruby-lang.org/en/raa-list.rhtml?name=Ruby%2FTk+Widget+Demos