I think this is partially correct. You can indeed control the standard
libraries by removing some from the libs folder (or redirecting the
LOAD_PATH to some other folder).
However, you can't control .Net assemblies. Even if you entirely remove
everything from the LOAD_PATH variable (or config section) you will still be
able to require .Net assemblies from the GAC by specifying their strong
name...

Shay.
------------------------
Shay Friedman
Author of "IronRuby Unleashed"
http://www.ironshay.com
Follow me: http://twitter.com/ironshay

On Sat, Aug 29, 2009 at 8:58 AM, Leo Carbajal <[email protected]> wrote:

> Howdy all,
>
> I've been following IronRuby along with IronPython for a while now and I
> read something on some of the archived messages (and on the webpage) that
> makes me curious.
>
> If you don't set search paths on IronRuby when hosting it, is it possible
> to run Ruby in such a way that you can't import\require any of the .NET
> namespaces like System and such? If so, does that mean I can therefore
> control exactly which standard libs and namespaces CAN be imported into the
> environment?
>
> That would be a dream, as currently the only way to 'sandbox' IPy is to do
> so through an appdomain with security permissions (To prevent things like
> Environment.Exit() and loading System.IO to do all kinds of mayhem). There's
> also a few bugs, it seems, that prevent even that from working right! I
> tried looking through the documentation but I couldn't find anything that
> specifically stated the 'benefits' of not setting the search paths, only
> warnings to always do so. If there's a section I missed, please do point me
> to it so I can read up.
>
> _______________________________________________
> Ironruby-core mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
>
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to