[Ironruby-core] Sealed method can be overriden
Shay Friedman
lists at ruby-forum.com
Sat Jun 13 04:22:11 EDT 2009
Hi guys,
I'm trying to override a sealed method in IR and I succeed.
For example:
C#:
public class Shape
{
public virtual int GetNumberOfSizes() { return 0; }
}
public class Square : Shape
{
public override sealed int GetNumberOfSizes() { return 4; }
}
IR:
class NewSquare < Square
def get_number_of_sizes
return 99
end
end
puts NewSquare.new.get_number_of_sizes # => 99
Bug or by design?
Thanks,
Shay.
----------------------------
Shay Friedman
http://www.ironshay.com
Follow me: http://twitter.com/ironshay
--
Posted via http://www.ruby-forum.com/.
More information about the Ironruby-core
mailing list