[Ironruby-core] Problem calling explicit interface methods

Alex 2k8 lists at ruby-forum.com
Thu Jan 8 05:25:18 EST 2009


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

But this one works fine:

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

What is wrong?

- Alex
Posted via http://www.ruby-forum.com/.

More information about the Ironruby-core mailing list