From: Charles Hixson Date: 2003-12-01T00:59:50+09:00 Subject: Re: anything disappearing from Ruby for 2.0? Yukihiro Matsumoto wrote: >Hi, > >In message "Re: anything disappearing from Ruby for 2.0?" > on 03/11/30, Michael Campbell writes: > >|Ack, no more: >| >|if (/foo/ .. /bar/) ? >| >|I find this construct terribly useful; I'd hate to see it go. > >Perhaps some other way to accomplish, for example, > > IO#from_to(re1, re2) {|line| ... } > >just an idea. > matz. > > I frequently have the need for a "between" operator, and it's quite convenient to have it built into the language in such a flexible way. OTOH, I don't know what the costs are. OTOH, if you are only discussing the removal of pattern ranges...well, I use that much less often, but it's certainly more legible than any replacement that I can think of. (And the from_to operator would seem to need to be a component of Iterator rather than IO.)