From: matz@... (Yukihiro Matsumoto) Date: 2003-08-13T00:59:05+09:00 Subject: Re: $SAFE = 5 and Safe Ruby Misleading? Hi, In message "Re: $SAFE = 5 and Safe Ruby Misleading?" on 03/08/13, Dave Fayram writes: |Basically, can I evaluate something in a $SAFE = 4 thread, then get it |out and work with it meaningfully? The untrusted thread can return value from it. For example, def safe_eval(str) Thread.start { $SAFE=4 eval(str) # the last evaluated value }.value # can be retrieved using "value" method end Besides, the thread can push data to the queue, then data is read by the trusted code, validated, then output. matz.