From: ts Date: 2002-10-15T00:51:35+09:00 Subject: Re: final in ruby >>>>> "K" == Kontra, Gergely writes: K> Will ruby some day support some kind of predicate or modifier, so I can K> protect my method beeing overwritten? Why do you want this, this can be usefull to modify a method. Imagine that someone write a stupid module like this : pigeon% cat b.rb #!/usr/bin/ruby require 'mwrap' Array.mwrap(:push, :stop) do |args| if args == 12 raise ArgumentError, "12 is not valid", [] end next_mwrapper 12 end a = [] 4.times {|i| a.push i } p a begin a.push 12 rescue p $! end Array.munwrap :push a.push 6 p a pigeon% pigeon% b.rb [12, 12, 12, 12] # [12, 12, 12, 12, 6] pigeon% this can be usefull :-) Guy Decoux