Re: [Ironruby-core] custom rake task

2010-07-27 Thread Will Green
n Behalf Of *Will Green > *Sent:* Tuesday, July 27, 2010 4:12 PM > *To:* ironruby-core@rubyforge.org > *Subject:* Re: [Ironruby-core] custom rake task > > > > Specifically, if you do an explicit return (use the return keyword) from a > Proc, that exits the scope in which the Pro

Re: [Ironruby-core] custom rake task

2010-07-27 Thread Goode, Troy
] On Behalf Of Will Green Sent: Tuesday, July 27, 2010 4:12 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] custom rake task Specifically, if you do an explicit return (use the return keyword) from a Proc, that exits the scope in which the Proc is executed. lambdas that return

Re: [Ironruby-core] custom rake task

2010-07-27 Thread Will Green
> (due to return semantics). I'll also be turning my WIX rake tasks into a > gem, so there will be more examples there. > > > > > -- > From: Goode, Troy > Sent: Tuesday, July 27, 2010 11:59 AM > To: Ironruby-core@rubyforge.org > Subject:

Re: [Ironruby-core] custom rake task

2010-07-27 Thread Jim Deville
les there. From: Goode, Troy Sent: Tuesday, July 27, 2010 11:59 AM To: Ironruby-core@rubyforge.org Subject: [Ironruby-core] custom rake task I was following Derek Bailey’s article from yesterday entitled “How to Build Custom Rake Tasks; The Right Way”<http://www.lostechies.com/blogs/

Re: [Ironruby-core] custom rake task

2010-07-27 Thread Will Green
When you give a method a block in Ruby (which is really what you're doing here), and you've defined it as a Proc, you need to pass the variable holding the Proc with an ampersand in front of it. This is because while code blocks and Procs conceptually do the same thing, they are not. The ampersand

Re: [Ironruby-core] custom rake task

2010-07-27 Thread Shay Friedman
You're missing an ampersand (&) on the define_task call. It should be: Rake::Task.define_task(*args, *&*body) Shay. Shay Friedman | Microsoft Visual C#/IronRuby MVP | Author of IronRuby Unleashed Blog: http://IronShay.com | Twitter: http://t

Re: [Ironruby-core] custom rake task

2010-07-27 Thread Sean Carpenter
The sample doesn't run in MRI, either :) You need an ampersand in front of "body" when passing to define_task: Rake::Task.define_task(*args, &body) Sean On Tue, Jul 27, 2010 at 2:40 PM, Goode, Troy wrote: > I was following Derek Bailey’s article from yesterday entitled “How to Build > Custom

[Ironruby-core] custom rake task

2010-07-27 Thread Goode, Troy
I was following Derek Bailey's article from yesterday entitled "How to Build Custom Rake Tasks; The Right Way" and tried to replicate some of his code in IronRuby. Now I've run into