[Ironruby-core] IronRuby overloaded method selection?

Orion Edwards orion.edwards at gmail.com
Sun Feb 22 15:15:29 EST 2009


I'm now running 10606 from the nightly builds, and it seems to be somewhat
fixed, but still not functioning. The error message now reads:

host.add_service_endpoint( IWcfContract, WSHttpBinding.new, Uri.new("...") )
=> :0: can't convert Module into ClrString (TypeError)

Running the code you suggested gives this:

>>> host.method(:add_service_endpoint).clr_members.each { |m| puts
m.to_string }
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.String, System.ServiceModel.Channels.Binding,
System.String)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.String, System.ServiceModel.Channels.Binding,
System.String, System.Uri)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.String, System.ServiceModel.Channels.Binding,
System.Uri)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.String, System.ServiceModel.Channels.Binding,
System.Uri, System.Uri)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.Type, System.ServiceModel.Channels.Binding,
System.String)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.Type, System.ServiceModel.Channels.Binding,
System.String, System.Uri)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.Type, System.ServiceModel.Channels.Binding,
System.Uri)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.Type, System.ServiceModel.Channels.Binding,
System.Uri, System.Uri)

It looks like IronRuby is having to choose between (String, Binding, Uri)
and (Type, Binding, Uri), and is selecting the former (when I want it to
select the latter).

I've tried doing this

host.add_service_endpoint( IWcfContract.to_clr_type, WSHttpBinding.new,
Uri.new("...") )

but the error message is still the same (can't convert module to ClrString).

to_clr_type returns a System.RuntimeType - does this inherit from
System.Type or is it a different thing entirely? - my knowledge of the CLR
in this area is somewhat weak :-(

Thanks a lot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090223/1470a464/attachment.html>


More information about the Ironruby-core mailing list