[Ironruby-core] Problem calling explicit interface methods

Tomas Matousek Tomas.Matousek at microsoft.com
Thu Jan 8 10:56:13 EST 2009


Filed bug #23494.

Tomas

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Alex 2k8
Sent: Thursday, January 08, 2009 2:25 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] Problem calling explicit interface methods

Hello,

I am trying to call explicitly implemented interface method, but get
such error
  undefined method `bar' for #<App::Cls:0x000005c>

C# code:

    public interface IFoo
    {
        void Bar();
    }

    public class Cls : IFoo
    {
        void IFoo.Bar() { }
    }

Ruby code:
    x = App::Cls.new
    x.bar


But this one works fine:

    public class Cls : IFoo
    {
        public void Bar() { }
    }

What is wrong?

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



More information about the Ironruby-core mailing list