Giles Bowkett | 1 Jan 2008 04:06
Picon
Gravatar

Re: how to store a block in a var?

> 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


Gmane