Hi all,

I have this piece of code: http://pastie.caboo.se/198524
I'm trying to use the "self" context of the instanciated class in the
Proc. I've got it working now, but isn't there a nicer way to use the
Proc.new() without having to use the "|obj|" part?

So instead of:

t.code = Proc.new { |obj| obj.instance_test() }

I want to use something like:
t.code = Proc.new { self.instance_test() }

I've tried some stuff but I can't / don't think I can get it working the
second way. Does anyone have some bright ideas about solving this
problem?

Thanks in advance!
Leon
-- 
Posted via http://www.ruby-forum.com/.