Hello. I've got this problem:

I'm having a .Net method with generics like this:

void Store<T>(T obj) where T : class, new();

And I'm trying to call it from IronRuby project with Ruby object as an
argument.

comp = Computer.new
session.method(:Store).of(Computer).call(comp)
#session is another user created .Net object, which has the method Store

And when I'm running the project an error pops up
"GenericArguments[0], "IronRuby.Builtins.RubyObject", in "Void
Store[T](T)" does not satisfy the restriction of the type parameter "T""

I guess that .Net generic just can't accept RubyObject as an argument.
But can I somehow bypass that restriction?

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to