1 Jan 2008 04:06
Re: how to store a block in a var?
Giles Bowkett <gilesb <at> gmail.com>
2008-01-01 03:06:48 GMT
2008-01-01 03:06:48 GMT
> var = Proc.new { stuff }
yah, but can I just pass it as a block of code?
do_stuff do
var.call
end
??
the thing is that do_stuff is the only thing that makes the code in
var meaningful, so when I do that now, I'm getting NoMethodError: no
method "call" for nil
--
--
Giles Bowkett
Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com
RSS Feed