-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 tags 320227 + confirmed forwarded 320227 [EMAIL PROTECTED] thanks
hi Szymon, Jeff, Jeff, see: http://bugs.debian.org/320227 On Wed, Jul 27, 2005 at 08:44:12PM +0200, Szymon 'Gandalf' Lapinski wrote: > $ apt-show-versions ruby > ruby/stable uptodate 1.8.2-1 > > $ echo -e "a\nb\nc\n" | glark -U b - > reading standard input... > 2 b > > With --no-filter option I'm expecting something like this: > 1 a > 2 b > 3 c > but instead of this I get an error: > > $ echo -e "a\nb\nc\n" | glark --no-filter -U b - > reading standard input... > error: undefined method `lines' for #<InputFile:0x40310688> indeed. This seems to be somewhat tricky to fix. glark is reading from stdin, the infile object does not have a method called lines, and the function write_all is therefore not able to count: 1 def write_all 2 (0 ... infile.lines.length).each do |ln| 3 print_line(ln) same happens if you read from a file: [EMAIL PROTECTED]:~$ glark --no-filter -U b test error: undefined method `lines' for #<InputFile:0xb7d12cb0> this could be fixed by doing something like: (0 .. inlines.linecount).each do |ln| but still does not solve the problem if reading from stdin (the method linecount is not available either when doing so). bye, - michael -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC6UUYEFV7g4B8rCURAqzMAJ9obG6J6WrjU5V9tcN0YdGSVDDxLACfQH3H B12cuZ8ST3pPbEXGbTmmwyE= =sTTs -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]