From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-08-11T02:26:50+09:00 Subject: Re: Possible to get source for arbitrary class? In article , JamesBritt wrote: >Is there a way to get a string version (i.e., a "source code" >representation ) of an existing object, such that it could be written to >disk and 'require'ed later, or passed to another process (using perhaps >dRb)? > > In TaskMaster I did this by reading a file to be required, stringifying it and then sending the string to the remote machine and having it required over there - You might try something similar. I wanted to do what you're proposing in your question, but when I asked a similar question some months ago the answer seemed to be that this was a feature coming in Ruby 2.0. It would be cool to have something like: sourceString = ClassName.source_code() Phil