From: matt_neuburg@... (Matt Neuburg) Date: 2009-07-31T04:00:11+09:00 Subject: Re: how to stop the subclass from overriding a method. Venkat Akkineni wrote: > Hi > > How would one create a method that is accessible from > outside but avoid the subclass from overriding and changing the > definition? Something like this? class Superclass def do_not_override end def self.method_added(s) if s == :do_not_override puts "Warning: you should not override this method" else super end end end That doesn't really prevent the programmer from working his will, but then in Ruby *nothing* can prevent the programmer from working his will (even "private" can be worked around, for example), so the warning seems a reasonable approach. m.