[Ironruby-core] Having difficulties using custom C# dlls with namespaces within IronRuby code

Sanghyeon Seo sanxiyn at gmail.com
Thu Jun 12 09:02:46 EDT 2008

2008/6/12 Philippe Monnet <ironruby at monnet-usa.com>:
>   - the require "mywebsvcproxy" returns true
>   - if I evaluate mywebsvcproxyns I get undefined

This is the expected behavior. See:

irb> require 'date'
=> true
irb> date
NameError: ...
irb> Date
=> Date

As in the above Ruby session, require in Ruby does not create a local
variable with the filename in the namespace. It simply makes classes
defined in the file available. IronRuby follows this behavior when
requiring DLL, so,

require 'mydllname'
MyDLLObject = MyDLLNamespace::MyDLLClass.new

Seo Sanghyeon

More information about the Ironruby-core mailing list