What I'm trying to do probably isn't possible, but maybe someone knows some
deep magic.
I'd like something like:
def runit &b
a = 42
pnew = Proc.new &b, binding
pnew.call
end
runit { puts "a is: #{a}" }
#would print:
a is: 42
Or course, Proc.new currently doesn't take a Binding object second argument.
What I'm wondering is if there is any way to 'rebind' or 'recontextualize' a
block?
Phil