From: Joel VanderWerf Date: 2005-09-01T02:03:49+09:00 Subject: Re: Question about Inheritance Martin DeMello wrote: > Joel VanderWerf wrote: > >>Just for fun... >> >>$ ruby code-nanny.rb >>Did you type too fast again? 'initalize' != 'initialize' >>Did you type too fast again? 'intialize' != 'initialize' >>Did you type too fast again? 'inaltiaez' != 'initialize' >>Did you type too fast again? 'initiliaze' != 'initialize' >>$ cat code-nanny.rb >>module CodeNanny >> def method_added(m) >> if /^in[ital]{2,6}[alize]{2,6}\b/ =~ m.to_s >> if m != :initialize >> warn "Did you type too fast again? '#{m}' != 'initialize'" >> end >> end >> end >>end > > > You missed 'initialise'! (I remember various ruby-lint projects being > mentioned in the past - anyone know what happened to them?) > > martin :) I almost added that, but I coudn't think of a humorous way to accuse the programmer of being a Queen's English speaker (maybe that's humorous enough as it is). -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407