From: vruz Date: 2004-10-09T06:44:52+09:00 Subject: Re: ANN: Free-form-operators patch > > > bugs. My intent is that it won't break _any_ existing code. > > Eeeeeeeeeeeeeeeeee-vil !! > > Eeeeeeeeeeeeeeeeeeeeeee-vil !! > > hehehe > > have fun :-) > But...but...my _heart_ is pure! > -- Markus > > P.S. Well, purer that some of my code at least. > otoh, discussing about Kansas (an ORM lib by Kirk Haines) Kirk came up with a case where he would like to redefine the != (and others) Quoting Kirk from IRC: 13:37 < wyhaines> Kansas lets one construct queries of the database using Ruby statements. Basically, method_missing plus overrides intercepts the Ruby and makes sense of it. So: 13:37 < wyhaines> ksdbh.select(:Foo) {|f| f.some_field == 'thingy'} 13:37 < wyhaines> works fine. However, an inequality is a problem because != can't be overridden. 13:38 < wyhaines> I can do: 13:38 < wyhaines> ksdbh.select(:Foo) {|f| f.some_field.not_equal 'thingy'} 13:38 < wyhaines> but that's ugly. I haven't found any other option, though. So there you go, in this scenario at least, the evil would be useful and would make more readable code