[Ironruby-core] Should Kernel.require accept Assembly instances?

Orion Edwards orion.edwards at gmail.com
Sat Aug 7 18:16:49 EDT 2010

What's the advantage to extending require?

Presumably you're currently using the .NET Assembly.Load or Assembly.LoadFrom methods to do this? (And if you're compiling code in memory, you'll certainly be making heavy use of the .NET reflection API's already anyway)

Require is a standard part of core ruby, and is meant to take paths.
While it's obvious to overload it to accept paths to dll's as well as rb files, overloading it to take non-path things (such as .NET assembly objects) seems like it's diverging a bit too far away from it's normal (ie: MRI ruby) use, and more into the realms of specific .NET extensions...

On 7/08/2010, at 10:08 AM, Charles Strahan wrote:

> What would you all think of having the ability to require a given Assembly?  I think this could be useful when compiling code in memory, in which case there isn't a path to give Kernel.require.
> If this is something we could all use, I'll open a ticket for it.
> -Charles
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core

More information about the Ironruby-core mailing list