[Rake-devel] :needs example
Jim Weirich
jim.weirich at gmail.com
Mon Sep 22 23:32:26 EDT 2008
On Sep 22, 2008, at 9:58 PM, Steven Parkes wrote:
> Ah. In that case, it does look like the arguments have to be an
> array, even
> if there's a single entry?
Yes.
> 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
> didn't.
>
> [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?]
That was never supported syntax. I'm kinda surprised it worked.
> 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?
So noted.
> And, if you're in the docs,
> The next to argumements are the names ...
> should be
> The next two arguments are the names ...
> no?
Thanks.
--
-- Jim Weirich
-- jim.weirich at gmail.com
More information about the Rake-devel
mailing list