From: Robert Klemme Date: 2004-08-17T16:46:00+09:00 Subject: Re: A method for summing several variables "Phil Tomson" schrieb im Newsbeitrag news:cfrg4e0283g@enews1.newsguy.com... > In article <412134AF.1060900@path.berkeley.edu>, > Joel VanderWerf wrote: > >Phil Tomson wrote: > >.. > >> Here's a crazy idea: > >> You can't do an 'eval' with $SAFE set to 3, but you could instead of > >> generating Ruby code, you could generate C code and use something like > >> RubyInline or Cgenerator (see: http://redshift.sourceforge.net/cgen/ ). > >> Either one of those can take C code and generate a shared lib (dll) that > >> can then be called from Ruby. > > > >That's no better than generating ruby code. $SAFE=3 won't let you create > >or load a shared lib. > > > > > > Ooops... I suppose that makes sense. > > So basically, you can't use extensions when you're in $SAFE=3 Not exactly: as long as you load them before switching $SAFE or from another thread it should work. robert