From: Patrik Sundberg Date: 2009-11-12T03:51:35+09:00 Subject: Separate code space/sandbox? Hi, I'm interested in figuring out a way to get a separate scope. I do not need any other traditional sandbox features, i.e. any code goes, I just want code evaluated in the scope to no affect the parent scope (at all). Example illustrating what I am after: a = 10 SeparatedScope.new do a = a + 1 p a end p a yielding: 11 10 I'd like it to have the same initialization/separation also for instance variables and even global variables if possible. Is something like that already available? If not, any good ideas for how to implement it? I did have a quick look at sandbox by _why, seems may do what I want but not so keen on the interpreter patching etc so looking for opportunities. Regards, Patrik -- Posted via http://www.ruby-forum.com/.