From: Thien Vuong Date: 2003-12-01T18:32:34+09:00 Subject: Re: anything disappearing from Ruby for 2.0? Michael Campbell wrote: > 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. >> >> >> > > That would work for the IO case, but I have used many times the ".." as > a flip-flop NOT relating to lines matching a regex. > > I think this is not the best thing for consideration of removal; I > haven't seen yet anyone get confused over it. > > I concur with this opinion. Also, I sometimes uses multiple pattern ranges in a scan loop so not sure if the IO#from_to would be able to do the same. I never need this functionality before until learned from PERL and it made lots of text scanning code simpler by not having to maintain state variables. >