From: Robert Dober Date: 2007-05-04T22:52:04+09:00 Subject: Re: RCR? On 5/4/07, Logan Capaldo wrote: > On 5/4/07, Robert Dober wrote: > > > > > > There would be another road to talk of course but it will brake to much > > code. > > > > String#delete_all( str_or_rgx ) > > String#delete_first( str_or_rgx) > > String#delete_last(str_or_rgx) # (1) > > String#delete an alias to String#delete_all > > and of course the same thing for the ! variations of these methods > > > > > > Getting OT, here but am I the only fool who constantly forgets that > String#delete is _not_ destructive like (Array|Hash)#delete_at ? No I checked in Rdoc and double checked in irb before writing this. But I feel that it is good as it is. Now to answer your question, neither you nor I are the only fools ;) > > I proceed to fix my problem: > > class String > alias without delete which is worth a serious consideration!!! I think it is very readable what about without_all (aliased to without) without_first without_last and delete_all! delete_first! delete_last! that would definitely make things easier for us fools ;) > end > > "abc".without("a") pretty cool > Robert -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw