Hi --

On Mon, 14 Apr 2008, Marc Heiler wrote:

>> Question: what am I doing wrong?
>
> What is the error message you recieve, and what is the content of the
> array? It *should* work (your .slice cuts away the first some members of
> the array) but its a bit hard to see whats going on (i dont have dpkg
> here to test)
>
> Btw "class dpkg" is unusual in that the first char is lowercased.
> Typical ruby code will normally be like so "class Dpkg" (just look at
> Array.new which is "class Array" or String.new which is "class String")

Actually, class dpkg won't run:

   $ ruby -e "class dpkg; end"
   -e:1: class/module name must be CONSTANT

The class keyword will work with either a constant, or a "<< object"
expression (for singleton classes).


David

-- 
Rails training from David A. Black and Ruby Power and Light:
   ADVANCING WITH RAILS   April 14-17          New York City
   INTRO TO RAILS         June 9-12            Berlin
   ADVANCING WITH RAILS   June 16-19           Berlin
See http://www.rubypal.com for details and updates!