load_assembly 'IronRuby' will do the trick.

Doing require 'ironruby' will actually load the ironruby.rb in the ironruby 
library dir, but that file just warns that its not required to load that file, 
and doesn't load any assemblies. We should probably just get rid of that file, 
or make it actually load the assembly.

~Jimmy

On Jan 17, 2010, at 6:45 PM, "Orion Edwards" 
<orion.edwa...@gmail.com<mailto:orion.edwa...@gmail.com>> wrote:

I'd like to use the IronRuby name mangling methods from within a script I'm 
writing, but it seems as though I can't access things that are defined in 
IronRuby.dll?

Reflector tells me that TryMangleName is a public static method on 
IronRuby.Runtime.RubyUtils, which is defined in IronRuby.dll.

I'm trying to access it like this:

> load_assembly 'IronRuby'
=> true
> System::AppDomain.current_domain.get_assemblies.each{|x| puts x}; nil
...(snip) ...
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
IronRuby, Version=0.9.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Microsoft.Scripting, Version=0.9.6.20, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35
...(snip) ...
=> nil
> IronRuby::Runtime::RubyUtils.try_mangle_name("Foo")
NameError: uninitialized constant IronRuby::Runtime
> IronRuby::Runtime
NameError: uninitialized constant IronRuby::Runtime

Is IronRuby treating it's own dll's specially? If so, is there any way I can 
get at the name mangling function?

Thanks, Orion.
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org<mailto:Ironruby-core@rubyforge.org>
http://rubyforge.org/mailman/listinfo/ironruby-core
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to