[Ironruby-core] interface generic w/ generic methods

Ivan Porto Carrero ivan at flanders.co.nz
Wed May 20 02:54:06 EDT 2009

I'm observing the following behavior when I try to implement a CLR interface
with generic method definitions.

So let's say an interface contains the following method definition

public interface IRubyEngine {
     T CreateInstance<T>(RubyClass rubyClass);

in ruby
class MyEngine
   include IRubyEngine

So far so good nothing has actually been created yet.

MyEngine.new => raises

(master) » ir
IronRuby on .NET 2.0.50727.4918
Copyright (c) Microsoft Corporation. All rights reserved.

>>> require 'bin/System.Web.Mvc.IronRuby.dll'
=> true
>>> class MyEngine
... include System::Web::Mvc::IronRuby::Core::IRubyEngine
... end
=> MyEngine
>>> MyEngine.new
mscorlib:0:in `_TermCreateClass': Method 'ExecuteFile' in type
'IronRuby.Classes.Object$1' from assembly 'Snippets.scripting,
0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
        from mscorlib:0:in `CreateTypeNoLock'
        from mscorlib:0:in `CreateType'
        from :0

>>> exit

in the console output above it complains about a different method but the
idea is the same. that method def was T ExecuteFile<T>(string path, bool

Do I put this on codeplex or is that the expected behavior?
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090520/3a30eff4/attachment.html>

More information about the Ironruby-core mailing list