On Thu, 27 Jan 2005, ts wrote:

>>>>>> "H" == Hugh Sasse Staff Elec Eng <hgs / dmu.ac.uk> writes:
>
> H>          Thread.new(input){|source|
> H>            $SAFE=5
> H>            instance_eval source
> H>          }.value
>
> Sorry to say this but this is the most common error that I see when
> someone try to eval some code with $SAFE >= 4
>
> The code will be eval'ed with $SAFE >= 4 but the result (#value) will be
> used with $SAFE = 0 and you can have problems.

Yes, that's a good point. 
>
> The result of #eval must be cleaned with $SAFE >= 4, before it's
> returned.

Thank you.  That would be better than cleaning it aftwerwards, I'd
not really considered that risk.
>
>
> Guy Decoux
>
         Hugh