[Ironruby-core] Initializing external Ruby libraries

Wayne Kelly w.kelly at qut.edu.au
Wed Feb 13 20:45:06 EST 2008


________________________________
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Peter Bacon Darwin
Sent: Thursday, 14 February 2008 11:01 AM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] Initializing external Ruby libraries

I believe the library side of this mechanism is already in-place.

Take a look at the \trunk\src\IronRuby.Libraries\Initializer.Generated.cs file which is automatically generated by the \trunk\src\IronRuby.Libraries\GenerateInitializers.cmd.  The cmd file reflects on the compiled library file, reading the RubyClass, RubyMethod, etc. attributes and generates the initialize code you describe below.  You can see this in action inside \trunk\src\ironruby\Runtime\Loader.cs : Ruby.Runtime.Loader.LoadStandardRubyLibraries().

What appears to be missing is the hosting side of things when you "require" one of these assemblies.  There doesn't seem to be any point in the assembly loading process that checks for a LibraryInitializer class and runs the LoadModules method.

Is that what you meant?
Yes, exactly.

Cheers, Wayne.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080214/f087d712/attachment.html 


More information about the Ironruby-core mailing list