From: why the lucky stiff Date: 2005-01-27T02:55:52+09:00 Subject: Re: When little languages grow... Hugh Sasse Staff Elec Eng (hgs@dmu.ac.uk) wrote: > The application is immaterial at the moment, but the problem is that > I need to do more than can be done with a simple case statement, and > if I were to use case statements managing the problem would get too > big. > > ... > > So the next possibility is to use something like > > input = nil > File.open("input.txt"){|f| > input = f.read > } > Thread.new(input){|source| > $SAFE=5 > instance_eval source > }.value > > or something, and actually make the commands in the language methods > of some Ruby object. I hear ya. I wish there was a way to open a jailed namespace. It'd be like chroot'ing into a module. The sandbox module would be addressable from ::Object, but would only include a limited set of modules when offered under chroot. _why