V
Vincent Foley
How can I have a block that optionally takes an argument? Thanks.
Vincent.
Vincent.
Vincent said:How can I have a block that optionally takes an argument? Thanks.
How can I have a block that optionally takes an argument? Thanks.
How can I have a block that optionally takes an argument? Thanks.
irb(main):001:0> p = proc do |*a|
irb(main):002:1* if a[0]
I seem to remember Ara Howard recently answered this with an idiomHow can I have a block that optionally takes an argument? Thanks.
Vincent.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.