Yes, super should work if the calling method is in a Ruby base class.
C#:
public class C {
public virtual int FooBar() { return 123; }
}
Ruby:
class D < C
def foo_bar
10 * super
end
end
p D.new.FooBar
p D.new.foo_bar
(there is a bug in the current bits that makes it throw an exception:
`get_MethodHandle': The requested operation is invalid for DynamicMethod.
(TypeError), I'll fix it asap).
Tomas
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Shay Friedman
Sent: Saturday, June 13, 2009 12:36 PM
To: [email protected]
Subject: Re: [Ironruby-core] Sealed method can be overriden
The same happens with non-virtual methods as well.
By the way, should you be able to call super when you override a virtual
method?
Thanks,
Shay.
----------------------------
Shay Friedman
http://www.ironshay.com
Follow me: http://twitter.com/ironshay
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core