matz / netlab.co.jp (Yukihiro Matsumoto) writes:

> |Another block question. Is there any way to re-parent a Proc?
> 
> Ruby/Tk is using this technics.
> 
>   TkButton::new(parent) {
>      label "hello world"
>      command { exit }
>   }

In fact my interest started after I started poking around inside Tk
and came across the technique. However, I then saw that you did the
instance_eval in a C extension, rather than directly in Ruby, so I got 
to wondering.

Many thanks for the answers.

Regards


Dave