[Rake-devel] :needs example

Steven Parkes smparkes at smparkes.net
Mon Sep 22 21:58:28 EDT 2008

> -----Original Message-----
> From: Jim Weirich [mailto:jim.weirich at gmail.com] 
> Sent: Monday, September 22, 2008 6:36 PM

> Rake was updated to not need the :needs parameter.  I must 
> have missed  
> a spot in the documentation.  Sorry.

Ah. In that case, it does look like the arguments have to be an array, even
if there's a single entry? I had tried it without :needs but I didn't need
two params, so I just did 
  task :name, :first_name => :pre_name do |t, args|
which fails.

The docs only talk about an array, so I should have tried that, but I

[Did this used to be true? I used to have (god knows why ...)
  Task { :name => :prereq }, :arg do |t,args|
which used to work but no longer does ... but perhaps never should have?]

Entirely optional, but it wouldn't hurt to mention explicitly that the args
has to be an array, even if there's only one element, given that being able
to pass single objects unwrapped seems to be a common idiom in Ruby?  

And, if you're in the docs,
  The next to argumements are the names ...
should be
  The next two arguments are the names ...

More information about the Rake-devel mailing list