On 2012ǯ0106 08:54, Roger Pack wrote:
> Every so often I wish I could do something like
> a = background_process
> a.send {
>  # compute something long
> }
> 
> Which would require the ability to "serialize" proc's.
> So consider this my feature request.

Short answer: we wish we could.  And theoretically speaking it is not
impossible.  But no one have ever been successful.

> First thing that comes to mind would be the ability to translate them
> into an AST.
>  RubyVM::InstructionSequence.disassemble might be related.
> Cheers!

A proc is not a code snippet.  It is a "closure".  To serialize a closure
is not a easy job.  If you just want to inject a code snippet to another
process, you'd better propose something other than a proc serialization.